Xlookup returning multiple not adjacent columns

INN

Board Regular
Joined
Feb 3, 2021
Messages
124
Office Version
  1. 365
Platform
  1. Windows
Hi
I am trying to make xlookup returning mutiple values. So I enter name and want xlookup to return phone number and salary. But it is not working. Is there anyway to retun multiple non adjacent values?
Thank you very much.

distinct-pivottable.xlsx
ABCDEFG
1NamephoneAddressSalary
2Chanelle11 main street10Noah220
3Noah22 main street20
4Sienna33 main street30
5Goldie44 main street40
6Logan55 main street50
7Elisabeth66 main street60
8Thea77 main street70
9Gil88 main street80
10Ron99 main street90
11Alan1010 main street100
Sheet4
Cell Formulas
RangeFormula
G2G2=XLOOKUP(F2,A2:A11,B2:B11&D2:D11)
Cells with Data Validation
CellAllowCriteria
F2List=$A$2:$A$30
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Thanks for your reply. Can it be done without using other fucntion like Choose(). I thought it can be done using Xlookup alone. Thank you.
 
Upvote 0
You're formula works for me. Looks like it worked in your example. What issue are you seeing?
 
Upvote 0
No. As good as XLOOKUP is, returning non-adjacent columns without other contortions is not possible as best I know.
 
Upvote 0
If you want them in separate cells then you could use either VLOOKUP or FILTER.
Book1
ABCDEFGH
1NamephoneAddressSalaryPhoneSalary
2Chanelle11 main street10Goldie440
3Noah22 main street20440
4Sienna33 main street30
5Goldie44 main street40
6Logan55 main street50
7Elisabeth66 main street60
8Thea77 main street70
9Gil88 main street80
10Ron99 main street90
11Alan1010 main street100
Sheet5
Cell Formulas
RangeFormula
G2:H2G2=VLOOKUP(F2,A2:D11,{2,4},0)
G3:H3G3=FILTER(FILTER(B2:D11,A2:A11=F2),{1,0,1})
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
F2List=$A$2:$A$11
 
Upvote 0
Another option would be XLOOKUP with FILTER:

=XLOOKUP(F2,A2:A11,FILTER(B2:D11,{1,0,1}))
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGH
1NamephoneAddressSalary
2Chanelle11 main street10Noah220
3Noah22 main street20
4Sienna33 main street30
5Goldie44 main street40
6Logan55 main street50
7Elisabeth66 main street60
8Thea77 main street70
9Gil88 main street80
10Ron99 main street90
11Alan1010 main street100
Main
Cell Formulas
RangeFormula
G2:H2G2=CHOOSECOLS(XLOOKUP(F2,A2:A11,B2:D11),1,3)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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