2 Way Lookup

Wigman86

New Member
Joined
Oct 12, 2017
Messages
18
Hello All

I am currently trying to do a 2 way lookup with unsorted data. So let's say that I want to return the value for where the value matches number 4 on my left column and G on the overhead row. So where 4 and G intersect return that value. In this case it would be 700. and the same for say where 5 and D intersect. The returned value here being 50. I hope that makes sense. Thanks in advance.




ABCDEFG
1
2 14 8
3 100 6
4 700
5 50
6 11
7 9
8
9 12
10

<colgroup><col width="64" span="9" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
The use of function INDEX along with function MATCH is all you need.


Book1
ABCDEFGHIJKL
2RowsColsLookup
34G700
45d50
5ABCDEFG
61
72148
831006
94700
10550
11611
1279
138
14912
1510
Sheet66
Cell Formulas
RangeFormula
C3=INDEX($F$6:$L$15,MATCH(A3,$D$6:$D$15,0),MATCH(B3,$F$5:$L$5,0))
 
Upvote 0
The use of function INDEX along with function MATCH is all you need.

ABCDEFGHIJKL
2RowsColsLookup
34G700
45d50
5ABCDEFG
61
72148
831006
94700
10550
11611
1279
138
14912
1510

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet66

Worksheet Formulas
CellFormula
C3=INDEX($F$6:$L$15,MATCH(A3,$D$6:$D$15,0),MATCH(B3,$F$5:$L$5,0))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Thank you DRSteele. This works great but in my case the data provided above was just an example. My data in column D of your table has multiple decimal signs and is specific. I am trying to return the value for 11.01.10.00 which you can see below is in column B and equals 12 however the formula keeps returning 10. I think this is because of the .00 but I cant find a work around for this as the number need to include the . symbols and stay the same. Thanks in advance for your help. Hope this makes sense.



ABCDEF
11.01.1010
11.01
11.01.10.0012
11.01.12.22

<colgroup><col><col span="5"></colgroup><tbody>
</tbody>
 
Upvote 0
Using his spreadsheet layout and formula while changing the number format to match yours, I returned a value of 12. Make sure the number type format matches in both areas. I'm not sure why else you would not receive the desired value. I purposefully tried to return 10 and could not.
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,787
Members
449,049
Latest member
greyangel23

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