Page 1 of 1

Nesting IIF functions

Posted: Fri Jul 30, 2004 5:26 pm
by Max_Malone_(Guest)
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?

=> RE: Nesting IIF functions

Posted: Fri Jul 30, 2004 9:00 pm
by kfleming
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__