Results 1 to 6 of 6

Thread: xlookup v index
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Oct 2008
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default xlookup v index

    Typically I want to extract the latest balance (the last figure) from a table of summed data which is sorted in ascending date order. Up to now, I have used the Index function, as in

    INDEX(Table16[Column5],COUNTA(Table16[Column5])

    but I always find Index unintuitive, so thought of the new Xlookup and easily and quickly came up with the formula

    XLOOKUP(TODAY(),Table16[Column1]],Table16[Column5]],-1,-1))

    The Index formula is more concise, and I wonder about calculation times. I find the Xlookup formula more intuitive to construct, but am I silly to use it in place of the more concise Index?
    Last edited by henryg; Sep 22nd, 2019 at 04:10 AM.
    Regards


    Henry

  2. #2
    Board Regular
    Join Date
    Dec 2008
    Posts
    6,657
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: xlookup v index

    Without seeing the underlying vba code used to run your XLOOKUP udf we are not in a position to judge performance, however I would suspect that the native index function will offer superior performance.

    If your task is as simple as your post, you could just use =LOOKUP(1e+100,Table16[Column5])

  3. #3
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    40,976
    Post Thanks / Like
    Mentioned
    90 Post(s)
    Tagged
    21 Thread(s)

    Default Re: xlookup v index

    @jasonb75
    I suspect the OP is referring to the beta Excel worksheet function XLOOKUP, only available to selected users, not a UDF.
    Hope this helps, good luck.
    Peter
    Excel 365 - Windows 10
    - Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the # key in the Reply window
    - Read: Forum Rules, Forum Use Guidelines, & FAQ

  4. #4
    Board Regular
    Join Date
    Dec 2008
    Posts
    6,657
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: xlookup v index

    Thanks, Peter!

    I happen to be one of the mere mortals not privy to such things. Looks like it has the potential to be quite a useful function, think it might be a bit more than is needed for the OP's purpose here though.

  5. #5
    Board Regular
    Join Date
    Oct 2008
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: xlookup v index

    Yes, indeed, I have the Insider version, and XLOOKUP is a bit of a new toy! Mike Girvin at ExcelisFun has a comprehensive video at

    https://www.youtube.com/watch?v=WO6Kjba5EPc

    But it is really good, and resolves a lot of problems with VLOOKUP, and obviates the need for INDEX/MATCH to solve them in many/most situations. For some reason I have always had a issues using INDEX/MATCH, whereas I find XLOOKUP easy and intuitive. I'm hoping it is not a lot slower, but have no means to test that.
    Regards


    Henry

  6. #6
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    40,976
    Post Thanks / Like
    Mentioned
    90 Post(s)
    Tagged
    21 Thread(s)

    Default Re: xlookup v index

    Quote Originally Posted by jasonb75 View Post
    I happen to be one of the mere mortals not privy to such things.
    I am in the same boat as you in terms of (not) having the function - I just happen to have read a little about it.
    Last edited by Peter_SSs; Sep 22nd, 2019 at 09:21 AM.
    Hope this helps, good luck.
    Peter
    Excel 365 - Windows 10
    - Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the # key in the Reply window
    - Read: Forum Rules, Forum Use Guidelines, & FAQ

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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