How Do I Identify the cell with the right cost?

derickj

New Member
Joined
Oct 11, 2008
Messages
40
I'm not sure how to approach this. I need write a formula to identify the cost based on the type of print and the quantity. This is the way the data table is constructed.
Qtr >=1 and <=11 and type = Laser Engraving is $2.24. How can I write a formula to select the right cost?

Type of Print Qtry
Laser Engraving10




Qty Cap112255075100250500100025005000
112449749924949999924994999
Embroidered$8.16 $14.39 $13.20 $6.45 $5.58 $5.54 $5.10 $4.95 $4.89 $4.86 $4.84
Printed$0.99 $7.99 $6.50 $5.96 $4.99 $3.99 $3.72 $3.35 $3.17 $2.99 $2.98
Laser Engraving$2.24 $9.24 $7.75 $7.21 $6.24 $5.24 $4.97 $4.60 $4.42 $4.24 $4.23
 
Please update your profile to show version as requested above.

Since your quantity ranges form a continuous sequence you don't need to check both upper and lower limit each time. Therefore you could also use a shorter formula like this.

25 01 20.xlsm
ABCDEFGHIJKL
1
2
3
4Qty Cap112255075100250500100025005000
51124497499249499999249949991000000
6Embroidered$8.16$14.39$13.20$6.45$5.58$5.54$5.10$4.95$4.89$4.86$4.84
7Printed$0.99$7.99$6.50$5.96$4.99$3.99$3.72$3.35$3.17$2.99$2.98
8Laser Engraving$2.24$9.24$7.75$7.21$6.24$5.24$4.97$4.60$4.42$4.24$4.23
9
10
11Type of PrintQuantityPrice
12Printed150$3.99
13Laser Engraving10$2.24
14Embroidered15000$4.84
15Laser Engraving500$4.60
Price
Cell Formulas
RangeFormula
C12:C15C12=HLOOKUP(B12,B$4:L$8,MATCH(A12,A$4:A$8,0))
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,226,099
Messages
6,188,901
Members
453,510
Latest member
LarryWB423

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