View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JNW JNW is offline
external usenet poster
 
Posts: 480
Default IF statement - multiple scenarios

=if(and(a10,a1<13),1,if(and(a1<0,a1-13),-1,if(and(a112,a1<25),2,if(and(a1<-12,a1-25),-2,if(a124,3,if(a1<-24,-3,0))))))

This assumes that if a1 is 0 then the result is 0 also.
--
JNW


"Laz" wrote:

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)