Nested IF Function

S

S Swedowski

I asked a question yesterday and got a quick answer and then today I realized
that I had asked the wrong question. :|

Can the IF function look at a number and if
the number is less than 249, add 10
between 250 and 750, add 20
between 751 and 1500, add 30
over 1500, add 40

or is this too much for the IF function.
 
D

Dave F

I asked a question yesterday and got a quick answer and then today I realized
that I had asked the wrong question. :|

Can the IF function look at a number and if
the number is less than 249, add 10
between 250 and 750, add 20
between 751 and 1500, add 30
over 1500, add 40

or is this too much for the IF function.  

=IF(A1<249,A1+10,if(and(a1>249,a1<751),a1+20,if(and(a1>750,a1<1501),a1+30,a1+40)))
 
P

PCLIVE

I'm assuming your first condition should include 249, though you state it as
"less than 249".

=IF(A1<=249,A1+10,IF(A1<=750,A1+20,IF(A1<=1500,A1+30,A1+40)))

HTH,
Paul
 
T

T. Valko

Try this:

=A1+LOOKUP(A1,{0,0.000001,250,751,1501},{0,10,20,30,40})

If A1 is empty it returns 0.
 
Top