IF functions in Excel

S

stephenheppell

Ok, im not yet that used to Excel, however i want to create a
function, that corresponds with a cell that has a cummilative total.
So what i want is that if the total in this cell is less than 4000 i
get the result of 40, if it is more than 4000 but less than 20000 i
get a result of 25, and if it is more than 20000 it equals 20

could someone perhaps show me the right formula for this. Thanks
 
J

JE McGimpsey

Ok, im not yet that used to Excel, however i want to create a
function, that corresponds with a cell that has a cummilative total.
So what i want is that if the total in this cell is less than 4000 i
get the result of 40, if it is more than 4000 but less than 20000 i
get a result of 25, and if it is more than 20000 it equals 20

could someone perhaps show me the right formula for this. Thanks

One way:

=LOOKUP(A1,{0,40;4000.1,25;20000.1,20})

another:

=IF(A1<=4000, 40,IF(A1<=20000, 25, 20))

another:

=40-15*(A1>4000)-5*(A1>20000)
 
S

stephenheppell

Many thanks that works a treat. Could you explain how the lookup
function is working? Thats the one ive used and its great, spot on but
not quite sure how it works thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top