Vlookup that Roundup to the higher value or Index and Match

RTDubb

New Member
Joined
Jul 15, 2012
Messages
3
CubicLocal $Outer Area $ShortHaul $Longhaul $InterIsland $
0.0032.004.006.008.0010.00
0.005
2.204.406.608.8011.00
0.008
2.404.807.209.6012.00
0.012.605.207.8010.4013.00
0.0122.805.608.4011.2014.00
0.0163.006.009.0012.0015.00
0.023.206.409.6012.8016.00

<tbody>
</tbody>

Hi, I am new here and have spent a bit of time looking for the best way to obtain the right answer.

The above table is charges our courier applies for tickets to different areas we send orders.

I already have another worksheet with a cell that is determining the correct area (IE. local, etc) but also need to enter into the next cell a number up to 3 decimal places. From there I need to get a result of the higher value. IE. 0.006 local = $2.40 charge OR 0.011 longhaul = $11.20

I have tried index/match but it needs an exact match. I have tried vlookup with TRUE but it rounds down. I have tried roundup on the cell figure first and then vlookup but the increments in the courier rate schedule don't match.

Does anyone have any ideas of what formula I can use? I'm going crazy
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi, welcome to the board.

Match does not need an exact match, it can be used to find the smallest value that is greater than the target value, which I think is what you want here.
But for that to work, you need to sort your data into the reverse order of what you have here, so that 0.02 is at the top.
I think re-sorting your data might be the easiest option.

Alternatively, a more complex option might be to say, IF the target value is matched exactly, lookup the relevant value, and if not, use the OFFSET function to pull the next value.
I assume it's possible that the target value might be matched exactly.
 
Upvote 0
Just to make it easier, the cells on the other worksheet (CHECK CHARGE) are A1 = cubic measure up to 3 decimal places AND B1 = Area. The above table is in another worksheet (COURIER RATES).

I applied this formula =INDEX('COURIER RATES'!$B$2:$F$17,MATCH('CHECK CHARGE'!A1,'COURIER RATES'!$A$2:$A$17,0),MATCH('CHECK CHARGE'!B1,'COURIER RATES'!$B$1:$F$1,0))
 
Upvote 0
Thanks Gerald. I tried reversing the order of the courier rate cubics but received an #N/A. My formula only works if the cubic measurement entered exactly matches the cubic on the table.
 
Upvote 0
Try changing the final argument in the MATCH function from 0 to 1 or -1, off the top of my head I can't remember which one, but play around with it and you should find it.
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
1​
Cubic Local $ Outer Area $ ShortHaul $ Longhaul $ InterIsland $
2​
0.003 2 4 6 8 10 local 0.006 2.4
3​
0.005 2.2 4.4 6.6 8.8 11 longhaul 0.011 11.2
4​
0.008 2.4 4.8 7.2 9.6 12
5​
0.01 2.6 5.2 7.8 10.4 13
6​
0.012 2.8 5.6 8.4 11.2 14
7​
0.016 3 6 9 12 15
8​
0.02 3.2 6.4 9.6 12.8 16

In J2 enter and copy down:

=INDEX($A$2:$F$8,MATCH(I2,$A$2:$A$8,1)+(LOOKUP(I2,$A$2:$A$8) < I2),MATCH(H2&"*",$A$1:$F$1,0))
 
Upvote 0

Forum statistics

Threads
1,216,466
Messages
6,130,795
Members
449,593
Latest member
morpheous

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