xlookup returning "0" in some cells, but works in about 95% of the table

AustSportingPix

New Member
Joined
Oct 5, 2020
Messages
44
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
This is a weird one, I've been using xlookup for the longest time, but I'm getting a weird thing happen now.

In a few of my tables when I use xlookup it'll work, but on a few rows it'll return 0.

The only way around it at the moment is "=if(xlookup=0,"",xlookup" and when you've got 50,000 rows its getting very slow and the files are getting huge.

ANy idea whats happening?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
What is your formula?
Can you post the sample data (especially of the one that is failing)?

Is the cell in the return_array blank by chance?
 
Upvote 0
XLOOKUP([@Horse],Dec22_[Horse],Dec22_[1],"")

I'm now being forced to use: =IF(XLOOKUP([@Horse],Dec22_[Horse],Dec22_[1],"")=0,"",(XLOOKUP([@Horse],Dec22_[Horse],Dec22_[1],""))) to get rid of the "0" in some cells
 
Upvote 0
As Scott mentioned a return value of zero typically means that the column you are returning contains either a blank or a “”.
Without seeing a sample of your data we don't know what the data type is, if you are only returning text you could have simply added & ""
eg
Excel Formula:
=XLOOKUP([@Horse],Dec22_[Horse],Dec22_[1],"") & ""

Assuming you are returning a number and since you have 365 the below would be more efficient.
Excel Formula:
=Let(returnvalue, XLOOKUP([@Horse],Dec22_[Horse],Dec22_[1],""),
        If(returnvalue = "", "", returnvalue)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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