+ Reply to Thread
Results 1 to 6 of 6

Slow Index or Match function in large data set

  1. #1
    Registered User
    Join Date
    04-15-2024
    Location
    Kuala Lumpur Malaysia
    MS-Off Ver
    2013
    Posts
    3

    Question Slow Index or Match function in large data set

    Hi all,

    I encounter a problem with index or match function perform very slow in large data set

    I am using excel to do optimisation for trading.
    I am building moving average for price with

    the formula i am using does not contain volatile behavior (with my limited knowledge i guess), below are the potential function causing the slow calculation

    =AVERAGE(INDEX($F$1:$F$20795,E179-$G$1+1):F179) , got 3 columns each with 20k data using this formula
    =MATCH("Cross down",M177:M20871,0), 1 column with 20k data using this formula
    =IF(K183=1,INDEX(N184:O20878,N184,2),0), 1 colum with 20k data with this formula


    The result of the worksheet will be calculated with changing variable the the final result is copy and paste into another sheet. All this is done by my own VBA code

    The speed is really slow when i perform this.

    Please help to solve the speed issue

    Thank you~~~~~

    Attached part of the workbook i am doing here

    Remark to note
    Initially, i was using Offset and vlookup to handle the result i want, as they are volatile, it is quite slow
    Then i replace them with index and match, but it get even slower

    Something to mention is when using offset and vlookup to do the job, every core of cpu is running with 100%
    after changing to index and match, speed drop and only 12%+- of cpu being utiliesed.

    I understand vba is single threaded process , but it is confusing as when i was using offset and vlookup to run the vba, it utiliese every core, then when change to index and match, it is slower and seem like using a core or two


    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: Slow Index or Match function in large data set

    Which version is this for - 2013 or 2021? Your profile should show the OLDEST version that any solution must work with.
    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
    Registered User
    Join Date
    04-15-2024
    Location
    Kuala Lumpur Malaysia
    MS-Off Ver
    2013
    Posts
    3
    Version 2021
    Last edited by AliGW; 04-15-2024 at 06:07 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  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: Slow Index or Match function in large data set

    Please remove 2013 from your profile.

  5. #5
    Registered User
    Join Date
    04-15-2024
    Location
    Kuala Lumpur Malaysia
    MS-Off Ver
    2013
    Posts
    3

    Re: Slow Index or Match function in large data set

    A discover from other excel help site is that thee delay of my issue is due to smart recalculation of excel that it took a bit of time to establish the logic tree, by turning it off through vba fullforce calculation do help to solve the lag of my issue
    but it make whole workbook volatile, end up no different compare to using offset and vlookup

    Guess this is what it is

  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: Slow Index or Match function in large data set

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

+ 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. Index/Match/Large Function duplicating
    By dewotorf in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2024, 01:18 AM
  2. [SOLVED] Large Data - Index Match Match with another function?
    By d7882 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-12-2017, 03:51 PM
  3. [SOLVED] Match Index Function for Large Array
    By takeawalkk in forum Excel General
    Replies: 10
    Last Post: 08-24-2017, 02:55 PM
  4. [SOLVED] INDEX/MATCH Array within LARGE Function?
    By DZ217 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-12-2015, 11:18 AM
  5. How to: Return next value w/ same # in index match large function?
    By Yoshi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2015, 02:35 AM
  6. Index match with large function
    By morobo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2014, 02:27 PM
  7. Using Index & Match with the Large function
    By JXH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2011, 08:39 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