nested multiple if
=IF(A2=730,730,IF(A2=545,"545-730",IF(A2=365,"365-545",IF(A2=180,"180-365","<180"))))
jenn wrote:
=IF(A2=730,730,IF(A2545,A2<730,"545-730"),IF(A2=365,A2<545,"365-545",IF(A2<365,A2180,"180-365"),IF(A2<180,"<180"))))
Its supposed to look at the data in A2 and if it is greater than 730 display
730
if the number in A2 is between 545 and 730 display 545 - 730
etc
I've gotten it to work before, but the above is telling me there are too
many arguments and my nested experience is weak.
thanks!
"Fred Smith" wrote:
You still haven't told us everything you need. And your use of quotes
doesn't make any sense -- ie, we can't tell if you want your results to be
numbers of text. Finally, what do you want to happen when A2 is between 365
and 545?
This syntax works, so maybe it will point you in the right direction:
=if(a2=730,730,if(and(a2545,a2<730),a2,if(a2=36 5,365,if(and(a2<365,a2180),a2,0))))
Regards,
Fred.
"jenn" wrote in message
...
I can not seem to get the syntax right.
=if(AND((A2730,"730),(A2545,A2<730,"545-730"),(A2<365,A2<180,"180-365)))...
basically... if 730 then 730
if between 545 and 730 then '545-730
|