Two-way lookup with INDEX and MATCH return closest match

mschelle6

New Member
Joined
Sep 28, 2009
Messages
6
I'm working on a spreadsheet and have run into a issue using Two-way lookup with INDEX and MATCH. If the value is not in the table, I need excel to use the next highest value. Below is the formula I'm using.

=INDEX('LarsonTable'!B4:K54,MATCH(Work!F20,'LarsonTable'!A4:A54,1),MATCH(Work!F16,'LarsonTable'!B3:K3,1))

This formula is not showing the next highest number

Frame
United Inches
7/8
25
Width of Molding in Inches
4.7

<colgroup><col style="width:48pt" width="64" span="4"> <col style="mso-width-source:userset;mso-width-alt:4022;width:83pt" width="110"> </colgroup><tbody>
</tbody>

Since 7/8 or 25 is not in the table, I need the formula to use 26 and 5.7, but current it's using 24 and 4.7

1/2"
1"
24 Feet
4.7
5.0
26 Feet
5.3
5.7

<tbody>
</tbody>

Thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hello,

You could test following:

Code:
[COLOR=#333333]=INDEX('LarsonTable'!B4:K54,MATCH(Work!F20,'LarsonTable'!A4:A54)+1,MATCH(Work!F16,'LarsonTable'!B3:K3)+1)[/COLOR]

Hope this will help
 
Upvote 0
This worked, but now it's adding an extra number when I have an exact match

Below is my criteria


Width
7/8
UI
25
Width of Molding
4.7

<tbody>
</tbody>


Table where information is pulled
UI
Width
1/2"
1"
20
4.0
4.3
22
4.3
4.7
24
4.7
5.0
26
5.0
5.3
28
5.3
5.7

<tbody>
</tbody>

In this example, I need to use the UI of 26 and the Width of 1", to get a Width of Molding of 5.3. My current formula is pulling the UI of 24 and the Width of 1/2" making me have a Width of Molding of 4.7.
If I have a UI of 28 and a width of 1/2", I need to use the exact value which will equal Width of Molding of 5.3

My current formula is
=INDEX('LarsonTable'!B4:K54,MATCH(Work!F20,'LarsonTable'!A4:A54,1),MATCH(Work!F16,'LarsonTable'!B3:K3,1))
 
Upvote 0
My current formula is
=INDEX('LarsonTable'!B4:K54,MATCH(Work!F20,'LarsonTable'!A4:A54,1),MATCH(Work!F16,'LarsonTable'!B3:K3,1))

See if this works
=INDEX(LarsonTable!B4:K54,MATCH(Work!F20,LarsonTable!A4:A54,1)+1*ISNA(MATCH(Work!F20,LarsonTable!A4:A54,0)),MATCH(Work!F16,LarsonTable!B3:K3,1)+1*ISNA(MATCH(Work!F16,LarsonTable!B3:K3,0)))

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,526
Messages
6,114,122
Members
448,550
Latest member
CAT RG

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