XLOOKUP function returning #VALUE inaccurately.

Anonymous
2023-10-29T13:06:22+00:00

I am running macOS Sonoma and excel version 16.78. Recently my Excel has stopped performing the xlookup function properly and returns #VALUE when it shouldn't. All other functions seem to be working properly. I have already tried the following things... (1) Ensuring that the lookup value is present in the lookup array (and formatted the same), even in some cases referencing the lookup value inside the lookup array to ensure there is a match. (2) Ensuring that the lookup array is the same size as the return array. (3) Trying multiple worksheets, workbooks, and versions of Excel. I tried the web and the desktop version of Excel... Same result.

*Note I was unable to attach screenshots as the 'File/s failed to upload' in this query box... I tried lowering the quality and changing the file type to no avail.

Microsoft 365 and Office | Excel | For home | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Bob Jones AKA CyberTaz MVP 436.6K Reputation points
2023-10-31T00:34:19+00:00

It seems you may have been misinformed about how XLOOKUP works.

In your first example the 2nd argument refers to an array which isn't shown [D5:E6]

In the 2nd example your first argument is a cell [G5] which is contained in the array referred to in the 2nd argument [G5:H6]

In the 3rd example you've specified the entire data range rather than just the column to be searched

Have a look at the information provided in the Microsoft Support article XLOOKUP function

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-10-31T00:00:59+00:00

    =xlookup(g5,g5:g9,h5:h9)

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-10-30T21:53:10+00:00

    Here are three examples - there are no spaces and all data is formatted as 'General'.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-10-29T21:10:29+00:00

    Please post a copy of the formula as well as some sample data. You can copy and paste a range into the forum message or paste an image of the range.

    Thanks

    Was this answer helpful?

    0 comments No comments
  4. HansV 462.6K Reputation points MVP Volunteer Moderator
    2023-10-29T14:08:40+00:00

    Could you create a stripped-down copy of the workbook demonstrating the problem (without sensitive information) and make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file here.

    Was this answer helpful?

    0 comments No comments