If Statement using greater than and less than

robertsgw

New Member
Joined
Aug 30, 2011
Messages
31
Office Version
  1. 365
Hello. I am trying to write a formula using greater than and less than. If the number of items is 12, I want it to calculate the price based on the criteria below. So the math using 12 items would be 12*$3=$36. How would you write an if statement so it evaluates the number of items in the cell and multiples it by the correct dollar rate? Thanks.


0-10 Items = $2.00
11-15 Items = $3.00
16-20 Items = $4.00
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hello. I am trying to write a formula using greater than and less than. If the number of items is 12, I want it to calculate the price based on the criteria below. So the math using 12 items would be 12*$3=$36. How would you write an if statement so it evaluates the number of items in the cell and multiples it by the correct dollar rate? Thanks.


0-10 Items = $2.00
11-15 Items = $3.00
16-20 Items = $4.00

Something like:

=A2*LOOKUP(A2,{0,11,16},{2,3,4})

where A2 houses a value like 12.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top