Nesting IIF functions

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Max_Malone_(Guest)
Posts: 1
Joined: Tue Oct 10, 2017 12:44 pm

Nesting IIF functions

Post by Max_Malone_(Guest) » Fri Jul 30, 2004 5:26 pm

I generate a number that must be compared to a series of ranges to find the range my number fits into. I tried to make the comparision to see if the number falls within the upper and lower limits of the first range. If it does, a code is printed; however, if it does not, the nest range is tested with the first nested IIF function. This requires 15 nested IIF functions. R&R 9.0.005 will only alow 10 IIF functions to be nested. This procedure works fine up to 10 nested IIF^s, printing the correct code.____What do I do?

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Nesting IIF functions

Post by kfleming » Fri Jul 30, 2004 9:00 pm

You need to use a series of calculated fields rather than just a single one.____For example CALC1 would contain:__IIF(Condition1,value1,value2)____Then CALC2 does:__IIF(Condition2,value3,CALC1)____Then CALC3 does:__IIF(Condition3,value4,CALC2)____You then use CALC3 on the layout and it tests each of the 3 conditions. And you can chain as many of these as you need.____Kathleen__R&R Support__

Post Reply