+ Reply to Thread
Results 1 to 4 of 4

Faster Formulas to speed up slow workbook;Is Index/Match quicker to calculate vs vlookup?

  1. #1
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Faster Formulas to speed up slow workbook;Is Index/Match quicker to calculate vs vlookup?

    Hello,

    I have an extremely largely workbook that I have been working on and I am trying to speed up the calculations.


    I have been reading the Index/Match formulas will speed up a workbook compared to vlookups, is this true?

    I am not familiar with using this formula before.. could someone explain how they differ? And how would I amend a current formula to change it to index / match?

    For example, please see below formula that I have just pulled from my spreadsheet - how does this get changed to a index / match formula?

    =IFERROR(VLOOKUP(CONCATENATE($C$5,$C$7,$A34),B_ZRXA_UOM!$A$3:$H$508,6,FALSE),"")

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Faster Formulas to speed up slow workbook;Is Index/Match quicker to calculate vs vlook

    Yes, Index / Match is a little quicker, as less data is loaded into memory. In your case, you are loading 8 columns into memory, to look up the 6th one. With Index / Match, you only load 2 columns. (Another benefit of Index / Match is the ability to look "left", which you can't do with Vlookup.)

    So your formula could be re-written:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Faster Formulas to speed up slow workbook;Is Index/Match quicker to calculate vs vlook

    INDEX(...MATCH()) may be slightly faster, I have not really tested it. The thing that really makes your lookup slow is the "exact match" linear search option (4th argument to VLOOKUP is FALSE, 3rd argument in Olly's MATCH() function is 0). "Approximate match" binary searches (4th argument to VLOOKUP() is TRUE or 3rd argument of MATCH() is 1 or -1) are much faster. If you can sort your lookup table on column A so that you can use a binary search option, you will realize some significant gains in the time needed for each search.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    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,053

    Re: Faster Formulas to speed up slow workbook;Is Index/Match quicker to calculate vs vlook

    508 rows and the formula is running slowly?? Either your sheet is massively larger, or the problem lies elsewhere. If you have only 508 rows, maybe you have some awkward array formulas that are slowing you up??

    Binary searches are faster, but require your data to be sorted. On massive sheets, the increase in efficiency can be really marked (not so much in the attached sample).

    See https://www.powerusersoftwares.com/s...-VLOOKUP-trick


    however, without seeing your sheet, it's hard to be definitive...

    Instead of this sort of formula:
    =VLOOKUP(A1,E2:F1600,2,FALSE)

    use this sort, instead:
    =IF(VLOOKUP(A1,E2:F1600,1,TRUE)=A1,VLOOKUP(A1,E2:F1600,2,TRUE),"")
    Attached Files Attached Files
    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

+ 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. Huge spreadsheet- Slow calculation speed for formulas
    By PoojaP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2018, 10:00 AM
  2. Faster option than VLOOKUP? INDEX/MATCH is taking twice as long...
    By mrbusto71 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2015, 09:44 PM
  3. [SOLVED] Should I use VLOOKUP or INDEX and MATCH (array) to calculate the data I need? (Part 1?)
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2014, 10:16 AM
  4. [SOLVED] Copy sheets to new workbook causing formulas to calculate slow
    By som3on3_10 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2014, 03:51 AM
  5. [SOLVED] Which method is faster, VLOOKUP or MATCH & INDEX?
    By Jimmyjazz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-20-2013, 04:35 PM
  6. [SOLVED] Help speed up slow INDEX (SMALL function
    By submariner18 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2012, 01:14 PM
  7. [SOLVED] Can faster CPU+larger/faster RAM significantly speed up recalulati
    By jmk_li in forum Excel General
    Replies: 2
    Last Post: 09-28-2005, 06:05 AM

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