+ Reply to Thread
Results 1 to 10 of 10

VBA Formula SUMIF with INDIRECT performance issue

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    8

    VBA Formula SUMIF with INDIRECT performance issue

    Hello

    For a budget tool, I have 2 sheets: one to input data (CPB90) and the second one to report data (liquidity plan) that sums input data per account / month with SUM.IF and using Indirect : +SOMME.SI(INDIRECT("'" & $E$3 & "'!$A11:$BQ800");$D17;INDIRECT("'" & $E$3 & "'!F11:F800")).

    This formula is needed for a high number of cells in Liquidity Plan sheet (152 rows x 14 columns) creating performance issues : 6 sec at every change in CPB90.

    I read a few discussions but cannot find a way to reduce significantly this (to be instantaneous "1 sec" so that users doesn't have to wait).

    Any idea?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Formula SUMIF with INDIRECT performance issue

    Put counting on manual during the input time.

    After input change it back to automatic.

    Please add the englisch formula as well, since this is an englisch forum.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Formula SUMIF with INDIRECT performance issue

    The formula's are not in english so unable to know what's happening in that file.

    Is it possible to convert the formula's in english and show it to us?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    06-20-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    8

    Re: VBA Formula SUMIF with INDIRECT performance issue

    Thanks for reply .

    EN formula is +SUM.IF(INDIRECT("'" & $E$3 & "'!$A11:$BQ800");$D17;INDIRECT("'" & $E$3 & "'!F11:F800")).

    Tes I can set calc as manual during input time, but even though when I refresh, than it's still 6 secondes. It doesn't solve the problem. I am asking if there is a way to reduce the processing time (whether calc automatic or calc manula+F9).

    If you open the attached file, go to CPB90, and enter a figure in CPB90, cell G12 for instance (then F9), you'll see the processing time.

    Fred

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Formula SUMIF with INDIRECT performance issue

    I couldn't open your zip file. Maybe you can post an excel file.

    Maybe you can copy => paste special => values for data you don't want to change with an formula.

  6. #6
    Registered User
    Join Date
    06-20-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    8

    Re: VBA Formula SUMIF with INDIRECT performance issue

    Here is the Excel file.
    Cannot copy paste since I need to sumif several lines from CPB90 sheet (let's say 15 lines for same account) => 1 line in Liquidity Plan file.
    You can see in the Excel file.Classeur1.xlsm

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VBA Formula SUMIF with INDIRECT performance issue

    There are 100 rows in column A.

    Data are filled till column BQ.

    You can change the range to e.g. 150 rows instead of 800 rows.

    Probably the indirect function also slows up the performance.

    You could try that, by hard coded the CPB90 in your formula.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VBA Formula SUMIF with INDIRECT performance issue

    Also, the criteria range should be restricted to only column A, not A:BQ
    Frankly I'm surprised it works at all with it like that.
    The SumRange and Criteria Range need to be the same dimensions.

    Also need to lock the Row#s in the ranges.
    And you don't need the sheet references in the formula, since that is being added via the UDF.

    Try
    =Somme_si_feuille($E$3,$A$11:$A$200,$D17,F$11:F$200)

  9. #9
    Registered User
    Join Date
    06-20-2014
    Location
    France
    MS-Off Ver
    2010
    Posts
    8

    Re: VBA Formula SUMIF with INDIRECT performance issue

    Thanks,guys. It works out just fine. I used your input, but i also set the manual calculation and use the activesheet.calculate only when necessary. All combined , now it takes 1 sec or less to display the figures. Thread can be closed.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VBA Formula SUMIF with INDIRECT performance issue

    You're welcome.

+ 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. [SOLVED] Need help! Using the INDIRECT function within a SUMIF formula
    By Kshari in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2014, 07:27 PM
  2. Simple SUMIF formula performance problems in macro
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 10:09 AM
  3. Worksheets, Indirect References and Performance Issues
    By Rikkdh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2013, 09:36 AM
  4. [SOLVED] tricky puzzle - sum and indirect formula issue
    By garyxprice in forum Excel General
    Replies: 5
    Last Post: 10-07-2012, 04:52 PM
  5. Increase performance speed by removing INDIRECT functions
    By pepperjoe in forum Excel General
    Replies: 1
    Last Post: 05-19-2011, 10:22 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