View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default IF statement - multiple scenarios

If the values will always fall within a range of -37<=value<=37, then we can
get even more concise...

=SIGN(A1)+FLOOR(A1/12.5,SIGN(A1))

If the values can fall outside of that range, we can still come in with a
formula that is 2 characters more concise...

=SIGN(A1)*(1+FLOOR(MIN(ABS(A1),36)/12.5,1))

Rick


"JNW" wrote in message
...
Much more concise than mine! I didn't know about the sign function.
Thanks.
--
JNW


"Roger Govier" wrote:

Hi

One way
=SIGN(A1)*IF(ABS(A1)<13,1,IF(ABS(A1)<25,2,3))

--
Regards
Roger Govier



"Laz" wrote in message
...
I'm sure this will be simple to many of you but I really need to know
how
to
formulate this into one statement, Any help is greatly appreciated.

IF A1 0 but < 13, 1
IF A1 < 0 but -13, -1
IF A1 12 but < 25, 2
IF A1 < -12 but -25, -2
IF A1 24, 3
IF A1 < -24, -3

You can also email me at
Thanks a lot.
Larry (Laz)