Lotus 123 @if(and statement
Lotus 123 @if(and statement
(OP)
Question:
I have a need to test for 3 or more conditions in a spreadsheet ex:@if(a=1 and @if( b=2 and @if( c=3, then "x", else "y"))).
Also have a need to test conditions within a range of #'s
ex: @if(a>20 and @if(a<=25,then x, else y))
Any help would be greatly appreciated.
I have a need to test for 3 or more conditions in a spreadsheet ex:@if(a=1 and @if( b=2 and @if( c=3, then "x", else "y"))).
Also have a need to test conditions within a range of #'s
ex: @if(a>20 and @if(a<=25,then x, else y))
Any help would be greatly appreciated.
RE: Lotus 123 @if(and statement
If you haven't yet started to used range names, then I would STRONGLY recommend that you start now. You'll see that it will make a HUGE difference in your overall use of Lotus 123.
Where you referred to "a", "b", "c", etc, I have used 3-digit names. You can use whatever name you like - usually one will use names that you can associate with the data. Be sure NOT to use names that will conflict with cell coordinates. For example, don't use a name like "a1". I you should want to use something like "a1", used the "_" character - e.g. "_a1" or "a1_".
Here are the formulas...
1) @IF(AAA=1#AND#BBB=2#AND#CCC=3,XXX,YYY)
2) @IF(AAA>20#AND#AAA<=25,XXX,YYY)
If you want to copy these formulas and have the reference to the range names stay "absolute" (fixed), then place the "$" character in front of those names you want to stay absolute.
I hope this helps.
Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
RE: Lotus 123 @if(and statement