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
 
Hi derickj,

Here's what I would do if you have Excel 365: *I am using the French version of Excel 365, so there might be some errors due to manual translation or discrepancies in the Excel user manual*

Excel Formula:
=VLOOKUP(A2,A6:L8,1+MATCH(1,(B2<=B5:L5)*(B2>=B4:L4),0),FALSE)

Here's a preview of the result:

Classeur1
ABCDEFGHIJKL
1Type of PrintQuantityPricetotal
2Printed1503,99598,5
3
4Qty Cap112255075100250500100025005000
51124497499249499999249949991E+06
6Embroidered8,16 $14,39 $13,20 $6,45 $5,58 $5,54 $5,10 $4,95 $4,89 $4,86 $4,84 $
7Printed0,99 $7,99 $6,50 $5,96 $4,99 $3,99 $3,72 $3,35 $3,17 $2,99 $2,98 $
8Laser Engraving2,24 $9,24 $7,75 $7,21 $6,24 $5,24 $4,97 $4,60 $4,42 $4,24 $4,23 $
Feuil1
Cell Formulas
RangeFormula
C2C2=VLOOKUP(A2,A6:L8,1+MATCH(1,(B2<=B5:L5)*(B2>=B4:L4),0),FALSE)
D2D2=C2*B2


If you have an older version of excel, we could look a way around if the function VLLOKUP or Match is not accessible.

Bests regards,

Vincent
 
Upvote 0
Try

A2=Laser Engraving, B2=10
Data range is A8:L12. A8=Qty Cap
Excel Formula:
=SUMPRODUCT((($B$8:$L$8<=B2)*($B$9:$L$9>=B2)*($A$10:$A$12=A2))*$B$10:$L$12)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Office 365
 
Upvote 0
Hi derickj,

Here's what I would do if you have Excel 365: *I am using the French version of Excel 365, so there might be some errors due to manual translation or discrepancies in the Excel user manual*

Excel Formula:
=VLOOKUP(A2,A6:L8,1+MATCH(1,(B2<=B5:L5)*(B2>=B4:L4),0),FALSE)

Here's a preview of the result:

Classeur1
ABCDEFGHIJKL
1Type of PrintQuantityPricetotal
2Printed1503,99598,5
3
4Qty Cap112255075100250500100025005000
51124497499249499999249949991E+06
6Embroidered8,16 $14,39 $13,20 $6,45 $5,58 $5,54 $5,10 $4,95 $4,89 $4,86 $4,84 $
7Printed0,99 $7,99 $6,50 $5,96 $4,99 $3,99 $3,72 $3,35 $3,17 $2,99 $2,98 $
8Laser Engraving2,24 $9,24 $7,75 $7,21 $6,24 $5,24 $4,97 $4,60 $4,42 $4,24 $4,23 $
Feuil1
Cell Formulas
RangeFormula
C2C2=VLOOKUP(A2,A6:L8,1+MATCH(1,(B2<=B5:L5)*(B2>=B4:L4),0),FALSE)
D2D2=C2*B2


If you have an older version of excel, we could look a way around if the function VLLOKUP or Match is not accessible.

Bests regards,

Vincent
Seems to work great. Thanks
 
Upvote 0

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