Help index match match with roundown

Unexcellent

New Member
Joined
Dec 18, 2017
Messages
6
I need to index match match but the data i am trying to find is in a table like below. The cost of the units needed is always rounded down so in the Cost column for 2478 units i want the cost of 2000 units against code 4/1 therefore £773, can anyone help??
CODE500100015001700200025003000CodeUnits Needed Cost
1/1£601£613£631£639£650£670£6894/12478
4/1£724£736£754£762£773£793£8124/4hs1145
4/2£793£805£823£831£842£862£8824/4+2435
4/4£739£751£768£774£783£800£8164/4hs1367
4/4+£1,181£1,193£1,210£1,217£1,228£1,248£1,2662/52223
4/4hs£870£881£898£906£917£936£9554/4hs1688
2/3+£1,059£1,070£1,087£1,095£1,105£1,125£1,1444/4hs3500
2/3hs£747£758£776£783£794£813£8324/4hs1234
3/1£903£914£929£935£944£961£9764/4hs2280
2/5£861£873£891£898£909£930£9494/4hs1447
4/5£943£955£973£980£991£1,012£1,0314/23003
5/5£1,015£1,027£1,045£1,052£1,063£1,084£1,1034/4hs1798
<colgroup><col width="64" style="width: 48pt;" span="9"> <col width="115" style="width: 86pt; mso-width-source: userset; mso-width-alt: 4205;"> <col width="176" style="width: 132pt; mso-width-source: userset; mso-width-alt: 6436;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
welcome to the board

With the first table located at A1:H13, and hence your lookup table located at J1:L13...

Cell L2, then copied downwards:
=INDEX($B$2:$H$13,MATCH(J2,$A$2:$A$13,0),MATCH(K2,$B$1:$H$1,1))

The trick is to do with the third argument of the second MATCH formula. 0 requires exact match, but you don't want this you want nearest match that's lower or equal, hence +1
 
Upvote 0
Thank you that works great, the only problem is that i have some unites needed values that are lower than 500 and as they round down they don't show a price, is there anything i can add to the formula so that for a number equal to or smaller than 499 is rounded up to 500? Thanks again fast reply and informative answer.
 
Upvote 0
So if i had a table like this: How would i find the price for 4/4hs and 60 units, it should show £870 but its showing 0 as its rounded down
CODE500100015001700200025003000 CodeUnits Needed Cost
01-Jan£601£613£631£639£650£670£689 4/12478
04-Jan£724£736£754£762£773£793£812 4/4hs1145
04-Feb£793£805£823£831£842£862£882 4/4+2435
04-Apr£739£751£768£774£783£800£816 4/4hs1367
4/4+£1,181£1,193£1,210£1,217£1,228£1,248£1,266 2/52223
4/4hs£870£881£898£906£917£936£955 4/4hs60
2/3+£1,059£1,070£1,087£1,095£1,105£1,125£1,144 4/4hs3500
2/3hs£747£758£776£783£794£813£832 4/4hs450
03-Jan£903£914£929£935£944£961£976 4/4hs2280
02-May£861£873£891£898£909£930£949 4/4hs1447
04-May£943£955£973£980£991£1,012£1,031 4/23003
05-May£1,015£1,027£1,045£1,052£1,063£1,084£1,103 4/4hs1798

<tbody>
</tbody><colgroup><col><col span="7"><col><col><col><col></colgroup>
 
Upvote 0
is there anything i can add to the formula so that for a number equal to or smaller than 499 is rounded up to 500?

Hi, welcome to the forum!

You could try this small amendment to baitmasters suggestion.

=INDEX($B$2:$H$13,MATCH(J2,$A$2:$A$13,0),MATCH(MAX($B$1,K2),$B$1:$H$1,1))
 
Upvote 0
Or just change the minimum order quantity from 500 to zero?

My understanding from your initial question would be that 500-999 needs to go off column B, 1000-1499 needs to go off column C, 1500-1699 needs to go off column C etc...

But if you're saying 0-499 needs to go off the same as column B then 0-499 is following the same pattern as 500-999... so really it's 0-999?
 
Upvote 0
Andrew_UK that has done it! I should of been able to apply that logic myself it seems so obvious now that you've pointed it out. Thanks to all!
 
Upvote 0
if i have calculated the stock needed for 1 week, 2 weeks, 3 weeks etc and the total price for each week below, how do i insert a box that tells me what the cheapest option is i.e. what the cheapest price will be per week if i buy and how many weeks i need to order for to get that price? I cant seem to find any help for this online


Units Needed for 8 Weeks CostUnits Needed for 9 Weeks CostUnits Needed for 10 Weeks CostUnits Needed for 11 Weeks CostUnits Needed for 12 Weeks Cost
27196174131083.75195834489.5195837895.251958413011958
18113149020638.5166122888166125137.51872273871872
655410747385.7511148217.511539049.25115398811153
15468981746.259061946.59062146.759172347917
558870722.25870886.58701050.758811215881
Storage Cost923.0769Storage Cost1038.462Storage Cost1153.846Storage Cost1269.231Storage Cost1384.615
Total Cost (Stock + Storage)9691.077Total Cost (Stock + Storage)12161.46Total Cost (Stock + Storage)14128.85Total Cost (Stock + Storage)14495.23Total Cost (Stock + Storage)15047.62
Total Cost P/Week1211.385Total Cost P/Week1351.274Total Cost P/Week1412.885Total Cost P/Week1317.748Total Cost P/Week1253.968
Cheapest Option:
Cost P/Week:

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>
 
Upvote 0
Hi, just a couple of things that might help you with any future postings:

1. You should really start a new thread for new questions; by doing so you will get more potential helpers looking at your question as many will skip over posts that already have multiple replies.
2. When you present sample data always try to include what your expected results are in relation to that sample data.

Is this the result you are looking for:


Excel 2013/2016
ABCDEFGHIJ
1Units Needed for 8 WeeksCostUnits Needed for 9 WeeksCostUnits Needed for 10 WeeksCostUnits Needed for 11 WeeksCostUnits Needed for 12 WeeksCost
227196174131083.75195834489.5195837895.251958413011958
318113149020638.5166122888166125137.51872273871872
4655410747385.7511148217.511539049.25115398811153
515468981746.259061946.59062146.759172347917
6558870722.25870886.58701050.758811215881
7Storage Cost923.0769Storage Cost1038.462Storage Cost1153.846Storage Cost1269.231Storage Cost1384.615
8Total Cost (Stock + Storage)9691.077Total Cost (Stock + Storage)12161.46Total Cost (Stock + Storage)14128.85Total Cost (Stock + Storage)14495.23Total Cost (Stock + Storage)15047.62
9Total Cost P/Week1211.385Total Cost P/Week1351.274Total Cost P/Week1412.885Total Cost P/Week1317.748Total Cost P/Week1253.968
10
11Cheapest Option:Units Needed for 8 Weeks
12Cost P/Week:1211.385
Sheet1
Cell Formulas
RangeFormula
B11=INDEX(A1:J1,MATCH(B12,A9:J9,0)-1)
B12=MIN(B9:J9)
 
Upvote 0
Thank you MrExcel MVP, I assumed that because i already had the attention of a few excel pros that i should stay on the same post but i will make a new one for each new question in the future and yes that was what i was looking for! Thanks again!
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

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