Problem with XLOOKUP on array

sharshra

Active Member
Joined
Mar 20, 2013
Messages
352
Office Version
  1. 365
I have to combine 2 tables using XLOOKUP. When I write formula in one cell & copy across other cells, I´m getting the correct result. When I use dynamic array, I get only the first column. 2nd column is not coming. I see that the output array is not spilled to 2nd column. Please help to resolve.

Also, another minor issue is that when there is no value in reference table, I´m getting 0. If there is no value, output should be blank, not 0.

Source table:
excel problems.xlsx
BC
3nameentry
4dfds1
5gfhno
6uir7
7qewr8.4
8xcvzno
9cmvn2.55
10dhgdhno
11teywu3
12sdf4
13gdno
14hkfino
Sheet6


Reference table:
excel problems.xlsx
EFG
3namecomment1comment2
4dfdsc1-1
5qewr
6xcvzc2-3
7cmvnc2-4
8dhgdhc1-5
9teywu
10sdf
11gdc2-8
Sheet6


Desired output:
excel problems.xlsx
JKLM
3nameentrycomment1comment2
4dfds1c1-1
5gfhno
6uir7
7qewr8.4
8xcvznoc2-3
9cmvn2.55c2-4
10dhgdhnoc1-5
11teywu3
12sdf4
13gdnoc2-8
14hkfino
Sheet6


Output thru XLOOKUP formula in single cell copied to other cells:
excel problems.xlsx
OPQR
14hkfino 
Sheet6
Cell Formulas
RangeFormula
Q14Q14=XLOOKUP(Table25[@name],Table36[name],Table36[[comment1]:[comment2]],"")

excel problems.xlsx
OPQ
13gdno0
Sheet6
Cell Formulas
RangeFormula
Q13:R13Q13=XLOOKUP(Table25[@name],Table36[name],Table36[[comment1]:[comment2]],"")
Dynamic array formulas.

excel problems.xlsx
OPQR
3nameentrycomment1comment2
4dfds1c1-10
5gfhno 
6uir7 
7qewr8.400
8xcvzno0c2-3
9cmvn2.550c2-4
10dhgdhnoc1-50
11teywu300
12sdf400
Sheet6
Cell Formulas
RangeFormula
Q4:R4,Q7:R12,Q5:Q6Q4=XLOOKUP(Table25[@name],Table36[name],Table36[[comment1]:[comment2]],"")
Dynamic array formulas.


Output thru XLOOKUP & dynamic array:
excel problems.xlsx
TUVW
3nameentrycomment1comment2
4dfds1c1-1
5gfhno
6uir7
7qewr8.40
8xcvzno0
9cmvn2.550
10dhgdhnoc1-5
11teywu30
12sdf40
13gdno0
14hkfino
Sheet6
Cell Formulas
RangeFormula
V4:V14V4=XLOOKUP(Table25[name],Table36[name],Table36[[comment1]:[comment2]],"")
Dynamic array formulas.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Fluff.xlsm
OPQR
3nameentrycomment1comment2
4dfds1c1-1
5gfhno
6uir7
7qewr8.4
8xcvznoc2-3
9cmvn2.55c2-4
10dhgdhnoc1-5
11teywu3
12sdf4
Sheet4
Cell Formulas
RangeFormula
Q4:R12Q4=DROP(REDUCE("",O4:O12,LAMBDA(x,y,VSTACK(x,XLOOKUP(y,E4:E11,F4:G11&"",{"",""})))),1)
Dynamic array formulas.
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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