Using the result of a IIF statement in a calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top