+ Reply to Thread
Results 1 to 7 of 7

XLookup reusing "old" return value

  1. #1
    Registered User
    Join Date
    02-17-2021
    Location
    DK
    MS-Off Ver
    365
    Posts
    3

    XLookup reusing "old" return value

    Hello,

    I'm using the xlookup function in order to date the day with a value greater than 450.

    The problem is when a value is recurring more than once, it will pick the earliest find instead of the chronologically correct day.

    How can i work around this?

    See day column jumping from 261 to 25

    Skærmbillede 2021-02-17 113458.jpg

    (edit: Excel sheet attached)
    Attached Files Attached Files
    Last edited by norgaards; 02-17-2021 at 10:28 AM.

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

    Re: XLookup reusing "old" return value

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-17-2021
    Location
    DK
    MS-Off Ver
    365
    Posts
    3

    Re: XLookup reusing "old" return value

    Thanks, now attached

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: XLookup reusing "old" return value

    you might try switching to an AGGREGATE approach

    I5: =IF(J5="";"";AGGREGATE(15;6;$A$5:$A$735/($C$5:$C$735=J5);COUNTIF(J$5:J5;J5)))
    copied down

    another alternative, to leverage dynamic output, would be to expand your FILTER, e.g.

    =FILTER(A5:C735;C5:C735>=450)

    and then just hide/collapse (via Group) the unwanted columns in resulting table return
    Last edited by XLent; 02-17-2021 at 08:07 AM.

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: XLookup reusing "old" return value

    edit: better than the above, you could use something like below (in UK format):

    =FILTER(FILTER((A5:C735),C5:C735>=450),{1,0,1})
    the 2nd FILTER hides the unwanted column (c/o 0 in 2nd position (col B))

    you may need to modify / tinker with the delimiters to get it to work in your locale.

  6. #6
    Registered User
    Join Date
    02-17-2021
    Location
    DK
    MS-Off Ver
    365
    Posts
    3

    Re: XLookup reusing "old" return value

    Thanks! I ended up just using the if function, works very well, as it is only for visual inspection and grouping of data.

    Have a nice day.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,375

    Re: XLookup reusing "old" return value

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Issue : VLOOKUP (XLOOKUP) not looking a pass "."
    By CWever in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2020, 01:18 PM
  2. [SOLVED] Formula to Locate Matching Data in Worksheets and return "1" or "0" to a specified Cell
    By hammer2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-30-2015, 04:52 AM
  3. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  4. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  5. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  6. [SOLVED] Find multiple "text" criteria and return as ""Yes" in Matrix
    By bertrand82 in forum Excel General
    Replies: 11
    Last Post: 04-30-2012, 09:20 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 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