XLOOKUP return multiple column and ignore blanks

Garmerr

New Member
Joined
Sep 13, 2017
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello Community,
I am trying to use the Xlookup function to return values that match my look up value. The values in the lookup table are spread across multiple columns and not all columns have values. I would like to return the lookup values and to exclude any blank values.

Currently, Xlookup brings back all of the values which includes the blanks and returns as 0. Would like to ignore the blanks and just move to the next column with a value in it.

Any ideas on the formula? I am running 365.

Lookup Value
Dog
Cat
Fish
Bird
Dog
Bird

Lookup Table
NameValue 1Value 2Value 3Value 4
DogFurryBig
CatFurrySmallBrown
FishYellow
BirdSmallRed

Ideal Result
NameResult 1Result 2Result 3Result X
DogFurryBig
CatFurrySmallBrown
FishYellow
BirdSmallRed
DogFurryBig
BirdSmallRed
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Perhaps this:

Book1 1-4-2024.xlsx
ABCDE
1NameResult 1Result 2Result 3Result X
2DogFurryBig
3CatFurrySmallBrown
4FishYellow
5BirdSmallRed
6DogFurryBig
7BirdSmallRed
8
9NameValue 1Value 2Value 3Value 4
10DogFurryBig
11CatFurrySmallBrown
12FishYellow
13BirdSmallRed
Sheet7
Cell Formulas
RangeFormula
B2:C2,B5:C7,B4,B3:D3B2=LET(x,XLOOKUP(A2,$A$10:$A$13,$B$10:$E$13,,0),FILTER(x,x<>0))
Dynamic array formulas.
 
Upvote 0
I am running 365.
Please add that to your forum profile (click your user name at the top right of the forum, then ‘Account details’) so helpers always know what Excel version(s) & platform(s) you are using. (Don’t forget to scroll down & ‘Save’)

Another possible option

24 01 06.xlsm
ABCDE
1NameResult 1Result 2Result 3Result X
2DogFurryBig
3CatFurrySmallBrown
4FishYellow
5BirdSmallRed
6DogFurryBig
7BirdSmallRed
8
9NameValue 1Value 2Value 3Value 4
10DogFurryBig
11CatFurrySmallBrown
12FishYellow
13BirdSmallRed
Remove blanks
Cell Formulas
RangeFormula
B2:C2,B5:C7,B4,B3:D3B2=TOROW(FILTER(B$10:E$13,A$10:A$13=A2),1)
Dynamic array formulas.
 
Upvote 0
Solution
Perhaps this:

Book1 1-4-2024.xlsx
ABCDE
1NameResult 1Result 2Result 3Result X
2DogFurryBig
3CatFurrySmallBrown
4FishYellow
5BirdSmallRed
6DogFurryBig
7BirdSmallRed
8
9NameValue 1Value 2Value 3Value 4
10DogFurryBig
11CatFurrySmallBrown
12FishYellow
13BirdSmallRed
Sheet7
Cell Formulas
RangeFormula
B2:C2,B5:C7,B4,B3:D3B2=LET(x,XLOOKUP(A2,$A$10:$A$13,$B$10:$E$13,,0),FILTER(x,x<>0))
Dynamic array formulas.
This method works. Thanks for reply.
 
Upvote 0
Please add that to your forum profile (click your user name at the top right of the forum, then ‘Account details’) so helpers always know what Excel version(s) & platform(s) you are using. (Don’t forget to scroll down & ‘Save’)

Another possible option

24 01 06.xlsm
ABCDE
1NameResult 1Result 2Result 3Result X
2DogFurryBig
3CatFurrySmallBrown
4FishYellow
5BirdSmallRed
6DogFurryBig
7BirdSmallRed
8
9NameValue 1Value 2Value 3Value 4
10DogFurryBig
11CatFurrySmallBrown
12FishYellow
13BirdSmallRed
Remove blanks
Cell Formulas
RangeFormula
B2:C2,B5:C7,B4,B3:D3B2=TOROW(FILTER(B$10:E$13,A$10:A$13=A2),1)
Dynamic array formulas.
Awesome. I found this solution to be a bit more efficient. Either of these will work.
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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