Using the result of a IIF statement in a calculation

L

Lynn L

I created the following IIF statement

=IIf([CountOfCli File Name]<51,"$225.00",IIf([CountOfCli File Name]>=51 And
[CountOfCli File Name]<=100,"$300.00",IIf([CountOfCli File Name]>=101 And
[CountOfCli File Name]<=250,"$400.00","$450.00")))

This works fine until I tried to use the result in another calculation. I
wanted to add this calculation to a SUMOf field by using the following

=Sum([=IIf([CountOfCli File Name]<51,"$225.00",IIf([CountOfCli File
Name]>=51 And [CountOfCli File Name]<=100,"$300.00",IIf([CountOfCli File
Name]>=101 And [CountOfCli File Name]<=250,"$400.00","$450.00")))]+[SumOfSet
Up Fee])

Is this possible?
 
S

strive4peace

If you want the numbers to be treated as numbers, remove the
quotes and the dollar signs

also, the equal sign should just be at the beginning of the
equation

=Sum(IIf([CountOfCli File Name]<51,225.00, ...

also, since the first IIF matching TRUE will be returned,
you can drop the range and just test for the high value

=Sum(IIf([CountOfCli File Name]<51,225,IIf([CountOfCli File
Name]<=100,300,IIf([CountOfCli File Name]<=250,400,450))) )

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top