Double lookup backwards

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
919
Office Version
  1. 365
Platform
  1. Windows
I have a target table and a list of values. The table should be filled based on the list.

Here's what it is normally: Two Way Lookup In Excel

So I have that one backwards:
1687352362632.png


And the source list is in the M1:M4. And the target is A1:K12. Both of these can be a lot bigger too (the list can have, say, 10000 values and the table can be 2000 rows. The column size is at least on the source list fixed).
The cells in A1:K12 should have some kind of formula, that reads from the source list that whether the given cell has a value or not. So, cell B2 result should be 5, cell C2 should result should be 3 and cell D3 result should be 8. The same row-column value shouldn't be defined more than once in the M1:O4 list.

This is trivial to do with VBA. But how about with Excel-formulas? I was trying something with VLOOKUP and INDEX-MATCH, but didn't really get a good solution with those.

So again, looking for a formula for those A1:K12 cells.

I'm using Excel 2016.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Upvote 1
Upvote 0
Solution
Another variation, with normal entry.

Cell Formulas
RangeFormula
B2:K12B2=IFERROR(INDEX($O:$O,AGGREGATE(15,6,ROW($O$2:$O$200)/(($M$2:$M$200=$A2)*($N$2:$N$200=B$1)),1)),"")
At least this worked great, thank you :)
 
Upvote 0
Are you saying mine didn't?
 
Upvote 0
From the way you said

I thought you were saying that my suggestion didn't work. That's why I asked.
Oh, I can understand how that can be seen that way. Yeah, specifically meant that we have here at the very least one well working solution, but there might just as easily be already two.
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,264
Members
449,093
Latest member
Vincent Khandagale

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