conditional formula: return 1 of 4 values

P

Pladdy

How can i use a conditional formula to return one of 4 values,
if C:13 is less than 274 should be 8,
if C:13 is less than 329 should be 16,
if C:13 is more than 329 should be 24,
if C:13 is more than 438 should be 32.

I know I'm close tough not quite

=(C13<274)*8 + (C13>274=16)*(C13<329=24)*24 + (C13>438)*32
 
A

Anne Troy

=if(c13<274,c13*8,if(c13<329,c13*16,if(c13<438,c13*24,if(c13>=438,c13*32,c13))))

Excel will continue until it finds a true.
The above says if it's less than 274, multiply it by 8. If it is not less
than 274, it will continue to the next argument. If you really need "less
than or equal to 274", then put C13<=274 as the first argument. You may also
need to consider what you want to do if it is zero or less than zero..

************
Hope it helps!
Anne Troy
www.OfficeArticles.com
 
P

Peo Sjoblom

Your criteria does not handle if a value is equal to so I had to guess

=LOOKUP(C13,{0;274;329;438},{8;16;24;32})

adapt to fit

--
Regards,

Peo Sjoblom

Portland, Oregon
 
P

Pladdy

You're the hero, many thanks......

Peo Sjoblom said:
Your criteria does not handle if a value is equal to so I had to guess

=LOOKUP(C13,{0;274;329;438},{8;16;24;32})

adapt to fit

--
Regards,

Peo Sjoblom

Portland, Oregon
 
Top