Dynamic array - 2 way lookup when both lookup value columns are spilled arrays of the same size

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
Hello!

I'm trying to create a 2 way lookup formula that spills when both lookup value columns are themselves spilled arrays. Both spilled array lookup values are the same size array For example:
Excel Formula:
=XLOOKUP(Q6#,Sheet1!$1:$1,XLOOKUP(R6#,Sheet1!$A:$A,Sheet1!$1:$1048576))

Is this possible or is there a way around it the value error?
Quick edit --- when I change both Q6# and R6# to just Q6 and R6 respectively and manually fill down the formula it works correctly. I'm trying to avoid the manual step of filling it down.

thank you!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try the U formula. Your formula is the T formula here.

Book1
ABCDEFGHIJKQRSTU
1BCDEFGHIJ
21B1C1D1E1F1G1H1I1J1
32B2C2D2E2F2G2H2I2J2
43B3C3D3E3F3G3H3I3J3
54B4C4D4E4F4G4H4I4J4
65B5C5D5E5F5G5H5I5J5G7G7G7
76B6C6D6E6F6G6H6I6J6C1C1C1
87B7C7D7E7F7G7H7I7J7E9E9E9
98B8C8D8E8F8G8H8I8J8B3B3B3
109B9C9D9E9F9G9H9I9J9I9I9I9
1110B10C10D10E10F10G10H10I10J10D1D1D1
12H9H9H9
13
Sheet1
Cell Formulas
RangeFormula
Q6:Q12Q6=CHAR(RANDARRAY(7,,66,74,1))
R6:R12R6=RANDARRAY(7,,1,10,1)
U6:U12U6=INDEX(Sheet1!$1:$1048576,MATCH(R6#,Sheet1!$A:$A,0),MATCH(Q6#,Sheet1!$1:$1,0))
T6:T12T6=XLOOKUP(Q6,Sheet1!$1:$1,XLOOKUP(R6,Sheet1!$A:$A,Sheet1!$1:$1048576))
Dynamic array formulas.
 
Upvote 0
Solution
Try the U formula. Your formula is the T formula here.

Book1
ABCDEFGHIJKQRSTU
1BCDEFGHIJ
21B1C1D1E1F1G1H1I1J1
32B2C2D2E2F2G2H2I2J2
43B3C3D3E3F3G3H3I3J3
54B4C4D4E4F4G4H4I4J4
65B5C5D5E5F5G5H5I5J5G7G7G7
76B6C6D6E6F6G6H6I6J6C1C1C1
87B7C7D7E7F7G7H7I7J7E9E9E9
98B8C8D8E8F8G8H8I8J8B3B3B3
109B9C9D9E9F9G9H9I9J9I9I9I9
1110B10C10D10E10F10G10H10I10J10D1D1D1
12H9H9H9
13
Sheet1
Cell Formulas
RangeFormula
Q6:Q12Q6=CHAR(RANDARRAY(7,,66,74,1))
R6:R12R6=RANDARRAY(7,,1,10,1)
U6:U12U6=INDEX(Sheet1!$1:$1048576,MATCH(R6#,Sheet1!$A:$A,0),MATCH(Q6#,Sheet1!$1:$1,0))
T6:T12T6=XLOOKUP(Q6,Sheet1!$1:$1,XLOOKUP(R6,Sheet1!$A:$A,Sheet1!$1:$1048576))
Dynamic array formulas.
Interesting this worked perfectly thank you! I should have thought to try Index Match in this situation instead of Xlookup.
Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,680
Members
449,116
Latest member
HypnoFant

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