+ Reply to Thread
Results 1 to 8 of 8

Speed problem with SUMIF

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Speed problem with SUMIF

    Afternoon,

    I currently have a large file... over 400 columns and over 25,000 rows... and to produce the required report from this data I am using a series of array SUMIF formulae but they are too slow.

    When I make the required changes to the file the recalculation time is around 8 minutes, not good when you need to use the file within a meeting or something similiar.

    I was wondering if anyone knew of a quicker and more efficient formula I would be able to use??

    I am using the following formula (or a variation of) at the moment:

    Please Login or Register  to view this content.
    Hope you can help me...

    Thanks

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264

    Re: Speed problem with SUMIF

    Try SUMPRODUCT

    see

    http://www.xldynamic.com/
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  3. #3
    Registered User
    Join Date
    01-21-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Speed problem with SUMIF

    I'll give it ago... Thanks!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Speed problem with SUMIF

    How many SUMIF formulas? How many of these formulas are doing the same thing? The sample formula you posted has 60,000 calculations being done, and that's one cell.

    Can you organize the data in a preliminary way so that some of the data is summarized in a single cell you can refer to directly instead of each cell doing the 60,000 calcs?

    For instance, a chart somewhere that organizes the data you're going to need into months.

    May-09 Total =YourFormulaAbove

    And anytime you need May09 figures you simply include that single cell?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264

    Re: Speed problem with SUMIF

    Try like this, I simplified the ranges so you will need to correct them for your circumstances

    =SUMPRODUCT((Data!$E$3:$E$29>=39934)*(Data!$E$3:E$29<=39964),Data!$E$3:$E$29)
    Last edited by EdMac; 01-26-2009 at 10:57 AM. Reason: correction

  6. #6
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Speed problem with SUMIF

    A pivot table would be an obvious suggestion.

    SUMIF would probably be a more efficient alternative too:


    =SUMIF(Data!$EF$3:$EF$29999,">=39934",Data!$EM$3:$EM$29999)-SUMIF(Data!$EF$3:EF$29999,"<=39964",Data!$EM$3:$EM$29999)

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  7. #7
    Registered User
    Join Date
    01-21-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Speed problem with SUMIF

    Errr... in total there are over 6,000 of these formulae in the file, that could be the problem!?!?!?

    There are all produce different reports for the powers that be!!

    I'll give the suggestions a go and see how I get on.

    Thanks All

  8. #8
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264

    Re: Speed problem with SUMIF

    Use two spare cells to enter the variable max and min numbers and then put these cell refs in your formula.

    That way your formula stays constant.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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