You are here:

Excel/price with a range of quantity



The table below starts from A1 to C17

Item          Qty    Price1
Mobile reader     1   2,400.00
Mobile reader    100   2,550.00
Mobile reader    200   2,700.00
Mobile reader    300   2,850.00
Mobile reader    500   3,000.00
Yoyo    1   12.00
Yoyo    20   15.00
Yoyo    40   40.00
Yoyo    50   60.00
Apple    1   10.00
Apple    15   15.00
Apple    20   18.00
Apple    25   21.00
Apple    40   24.00
Apple    50   27.00
Apple    100   40.00

Say, A20: Item, B20: Quantity

Can you please help me with a formula to determine an item with a specified quantity. For example, the price for Apple, Q=24 should be $18; Apple, Q=40 should be $24; etc.

Thanks again for your previous help.



I used this formula with your database (A1:C17) with the values you show for A20 and B20 to return the results you show.

Apple   24   returned 18
Apple   40   returned 24


Format the cell with the formula as currency if you want to see $18.00 and $24.00

if you wanted to put your lookup values to the right of your data, then you could change the formula to refer to all of column A

F20:  Apple
G20:  24

H20: =VLOOKUP($G20,OFFSET($A$1,MATCH($F20,$A:$A,0)-1,1,COUNTIF($A:$A,$F20),2),2,TRUE)

Tom Ogilvy

Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 All rights reserved.