Need help with nested function...please

B

britgirl

Hi there, I am trying to make a formula to calculate different rates
dependent on the initial cell value...

i.e. if c2 >= 40.1 and <= 45, then (c2*1) and if c2>= 45.1 and <= 50,
then (c2*1.5) and if c2 >= 50.1 then (c2*2) and if c2 < 40 then 0

I have tried various combinations of parentheses, operands et al, but
don't seem to be able to find the right mix... :confused:

Can anyone help please...
 
P

Peo Sjoblom

One way

=C2*VLOOKUP(C2,{0,0;40.1,1;45.1,1.5;50.1,2},2)



--
Regards,

Peo Sjoblom

(No private emails please)
 
B

britgirl

....Pete, your formula worked like a champ. I was trying to make it more
difficult than it needed to be.

Peo, I typed in your formula:
=C2*VLOOKUP(C2,{0,0;40.1,1;45.1,1.5;50.1,2},2)
...but keep getting an error message at the left curly bracket.
 
P

Peo Sjoblom

Don't know why you get an error, it returns the exact same result as Pete's
unless C2 is negative
however it is 4 character less to type <bg>

--
Regards,

Peo Sjoblom

(No private emails please)
 
Top