+ Reply to Thread
Results 1 to 7 of 7

XLOOKUP returns #VALUE! No clue why.

  1. #1
    Registered User
    Join Date
    01-07-2022
    Location
    Texas
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO
    Posts
    23

    XLOOKUP returns #VALUE! No clue why.

    The formula below is intended to perform 2 matches. It works well, except when the 2nd field does not have a match in the Payroll tab. If there's no match, I simply want to to put "0" (zero). Thanks.

    =XLOOKUP($A3,Payroll!$A$1:$A$400,(XLOOKUP(J$1,Payroll!$A$1:$AZ$1,Payroll!$A$1:$AZ$400,0)),0)
    Attached Files Attached Files
    Last edited by JamesParkerDC; 01-12-2022 at 04:21 PM.

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: XLOOKUP returns #VALUE! No clue why.

    You can just wrap it all in an IFERROR(..,0):

    Please Login or Register  to view this content.
    You could also use INDEX/MATCH if you want compatibility with earlier office versions:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,047

    Re: XLOOKUP returns #VALUE! No clue why.

    For a start... the term in J1... Other wage... does not appear in payroll.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,079

    Re: XLOOKUP returns #VALUE! No clue why.

    You don't have a column called Other Wage on the Payroll sheet & you have told xlookup to return 0 if not found.

  5. #5
    Registered User
    Join Date
    01-07-2022
    Location
    Texas
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO
    Posts
    23

    Re: XLOOKUP returns #VALUE! No clue why.

    Quote Originally Posted by Fluff13 View Post
    You don't have a column called Other Wage on the Payroll sheet & you have told xlookup to return 0 if not found.
    Yes...that is actually what I am trying to accomplish. My payroll software only exports columns that have non-Zero numbers. We had no "other wages" this run, so it left it out. I'm trying to get my helper sheet to simply put "0" if there is no data to be found. Instead, I get a #VALUE!, hence the problem. I could use the #IFERROR wrap as WBD proposed above if there is no other solution.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,079

    Re: XLOOKUP returns #VALUE! No clue why.

    In that case try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-07-2022
    Location
    Texas
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO
    Posts
    23

    Re: XLOOKUP returns #VALUE! No clue why.

    Thank you all for your helpful suggestions. GREAT seeing a community like this work to help each other out. I went with WBD's IFERROR wrap. I also used his Index/Match instead of XLookup. It's a bit easier for me to look at. Of course, it worked!!! :D

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Xlookup returns "-" but not the return array's value
    By immigrated4urjob in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-16-2021, 11:01 AM
  2. Xlookup returns a 0 (zero) instead of blank
    By AC101 in forum Excel General
    Replies: 2
    Last Post: 08-20-2021, 04:35 PM
  3. [SOLVED] When XLOOKUP Returns Value add hyperlink
    By DropAGearN'Disappear in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-19-2021, 11:06 AM
  4. No Clue
    By miahson in forum Excel General
    Replies: 2
    Last Post: 06-02-2009, 03:58 PM
  5. Haven't got a clue!!!
    By DarrenG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2006, 07:59 AM
  6. No Clue...
    By tahir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2006, 08:45 AM
  7. I have not got a clue
    By emailreynolds in forum Excel General
    Replies: 1
    Last Post: 08-25-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1