+ Reply to Thread
Results 1 to 8 of 8

xlookup not returning value due to looking up dates

  1. #1
    Forum Contributor
    Join Date
    07-03-2019
    Location
    Victoria, Australia
    MS-Off Ver
    Office 365
    Posts
    126

    xlookup not returning value due to looking up dates

    Hi Excel Forum,

    I'm needing your help again on a issue i'm currently having trying to return a text field if a date equals if the Lookup Date equals the date in the table and the Return Field Day equals the the same day that the Date falls under.

    So the example in the sample file i'm using 23/2/2022 which should return Wednesday just returns #VALUE!

    the formula i'm using is
    Please Login or Register  to view this content.
    Thanks
    DHarvey
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: xlookup not returning value due to looking up dates

    The syntax is wrong and you can't use a 2D array with XLOOKUP.

    It would help if you told us what you were trying to do.

    If this is meant to be doing what I think it is, then this should work:

    =LET(d,C2,SEQUENCE(1,7,d-WEEKDAY(d,11)+1))

    Again, no need for the lookup table.
    Attached Files Attached Files
    Last edited by AliGW; 05-08-2022 at 01:19 AM. Reason: Workbook attached.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-03-2019
    Location
    Victoria, Australia
    MS-Off Ver
    Office 365
    Posts
    126

    Re: xlookup not returning value due to looking up dates

    Hi AliGW,

    My apologies that's not what i was looking for i might not have explained it clear enough and that's my mistake. I have tweak the spreadsheet a little to make it a little clearer.

    What I want is a formula that will look at the date in C2 and search the table of dates from C8:I12 and if its in the Wednesday column return with Wednesday in cell C4.

    Hope this is a little clearer now

    Thanks
    DHarvey
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: xlookup not returning value due to looking up dates

    Ah, I see!

    Try this:

    =INDEX(Table1[#Headers],SUMPRODUCT((Table1=C2)*(COLUMN(Table1[#Headers])-2)))
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-03-2019
    Location
    Victoria, Australia
    MS-Off Ver
    Office 365
    Posts
    126

    Re: xlookup not returning value due to looking up dates

    Hi AliGW,

    Thanks that work as i wanted it to, apologies for not being clearer first time.

    Thanks
    DHarvey

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: xlookup not returning value due to looking up dates

    No worries. It always helps to add expected outcomes to sample workbooks! A non-functioning formula that is already incorrectly built is difficult to reverese engineer for intent.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,065

    Re: xlookup not returning value due to looking up dates

    Why is there a need to put up a table and lookup to this table for day of week of a particular date when you can get the day of week from the date field itself?
    C3=C2 format cell as "dddd" or C3=TEXT(C2,"dddd")
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: xlookup not returning value due to looking up dates

    That's a very good question, Joseph!!!

+ 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. [SOLVED] XLOOKUP for dates avoid 1/0/1900 for blank cells
    By Webbers in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-24-2022, 02:56 AM
  2. [SOLVED] XLOOKUP and dates with multiple criteria.
    By RD3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-14-2022, 09:20 AM
  3. XLOOKUP not finding/returning matches on X & Y axis.
    By JamesParkerDC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2022, 12:13 PM
  4. Replies: 3
    Last Post: 06-24-2021, 10:31 AM
  5. [SOLVED] XLookup returning wrong values when using two conditions
    By Einrastor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2020, 07:38 AM
  6. [SOLVED] Returning specific dates, ignoring already returned dates
    By FP91 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-16-2018, 07:02 AM
  7. returning dates in between dates that matches a specific name
    By dpons in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2015, 08:28 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