+ Reply to Thread
Results 1 to 9 of 9

Alternative way to make this lighter/faster

  1. #1
    Registered User
    Join Date
    07-24-2020
    Location
    Cavite, Philippines
    MS-Off Ver
    Office 365
    Posts
    3

    Alternative way to make this lighter/faster

    I hope I have successfully attached my excel file. Anyway the main concept is to sum the values by LEVEL. (e.g. "Level 1" is the sum of all items labeled "Level 2", "Level 2" is the sum of all "Level 3" and so on) if at all possible, to be all in the same column. I have a perfectly working workbook but the problem is that this particular document can easily reach 5000 to 15000 rows and it gets REALLY slow. I have to turn my Calculation Options to Manual every time I need to edit but it still takes at least 3 minutes just to add another row. Thanks in advance. any form of help is appreciated.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Alternative way to make this lighter/faster

    How about in AA2:

    Please Login or Register  to view this content.
    Drag down

    AF2:

    Please Login or Register  to view this content.
    With first SUMIF is sum below codes those higher than B2, the second one is minus duplicate code of B2

    Now all unneeded helper columns in the left can be removed.
    Last edited by bebo021999; 07-24-2020 at 05:24 AM.
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    06-25-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    129

    Re: Alternative way to make this lighter/faster

    Hi,,

    Try checking the below.

    Check if you have any external files linking
    Look for Name Ranges in Name Manager.
    Removing Grid lines will also help
    Delete all unused Rows, Col's and tabs
    Save the file in Binary Workbook and check performance
    Also looks like your file has tables that make much slower
    Last edited by Sri.n; 07-24-2020 at 05:24 AM.

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

    Re: Alternative way to make this lighter/faster

    just to clarify, the performance hit is tied to your extensive use of COUNTIFS ('helper' columns as referenced by @bebo)

    COUNTIFS, contrary to common belief, is not very efficient, nowhere near as efficient as SUMIFS counterpart so, when used in large volume this can cause significant overheads.
    (conditional formatting will not help matters either, in terms of volatility)

  5. #5
    Registered User
    Join Date
    07-24-2020
    Location
    Cavite, Philippines
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Alternative way to make this lighter/faster

    Quote Originally Posted by bebo021999 View Post
    How about in AA2:

    Please Login or Register  to view this content.
    Drag down

    AF2:

    Please Login or Register  to view this content.
    With first SUMIF is sum below codes those higher than B2, the second one is minus duplicate code of B2

    Now all unneeded helper columns in the left can be removed.
    wow this is quite perfect thanks!
    but this kind of "not aligned with the same row" formula are the types that get all over the place when i start adding rows in between.

    what i do normally with this is I use =indirect(address(row()+1,column()))

    is this okay or is it very volatile?

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Alternative way to make this lighter/faster

    Let follow my suggestion in #2, post file again then start again with your new issue.

  7. #7
    Registered User
    Join Date
    07-24-2020
    Location
    Cavite, Philippines
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Alternative way to make this lighter/faster

    Okay here is the file with updated formulas and different data

    nevermind the aforementioned issue as it is not really important. anyway, using a different data, i have seen a flaw at row 126 (please see attached image).
    it seems to include the other "Level 8" items even though those items should belong only on the new "Level 6" items.

    PS. using your formula made the file a lot lighter to use but I still spend about a minute on "Calculating (8 threads)". do you think with having 17000+ rows
    I will have to expect it anyway?
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,941

    Re: Alternative way to make this lighter/faster

    Try the following:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Alternative way to make this lighter/faster

    Please try at M2

    =IF(A2>7,0,IFERROR(SUM(K3:INDEX(K3:K$1319,AGGREGATE(15,6,MATCH(A2-{0,1,2},A3:$A$1319,),1))),SUM(K3:K$1319)))
    Attached Files Attached Files
    Last edited by Bo_Ry; 07-30-2020 at 03:54 AM.

+ 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. Replies: 2
    Last Post: 09-29-2017, 10:18 AM
  2. [SOLVED] Alternative and faster code
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2013, 09:31 AM
  3. VBA Arrays - Faster alternative than Vlookup?
    By danmcdon in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-22-2012, 10:28 AM
  4. Alternative faster way to do the same thing
    By mrall in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2011, 03:33 AM
  5. Faster alternative to dictionary object?
    By gpotter_htg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2011, 05:09 PM
  6. Faster alternative to SUMPRODUCT?
    By speakers_86 in forum Excel General
    Replies: 4
    Last Post: 10-03-2006, 10:07 AM
  7. Which is faster? SUMPRODUCT or VLOOKUP, or another alternative?
    By SteveC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-26-2006, 09:00 AM

Tags for this Thread

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