+ Reply to Thread
Results 1 to 7 of 7

Improve Calculations Speed

  1. #1
    Registered User
    Join Date
    05-29-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    58

    Improve Calculations Speed

    I am using this formula on over 1000 rows and it is slowing down calculations.

    Is there any way to make it any more efficient please?

    Please Login or Register  to view this content.
    I should explain what it is supposed to do:

    The first IF is simply to check if there is any data.
    The second IF is to check if all of the data appears in an approved list (14 cells, so if it is more or less than 14, return blank)
    The second SUMPRODUCT is adding up the data against another list of results

    Any advice much appreciated.
    Last edited by samcdavies; 11-21-2015 at 05:40 PM. Reason: Explanation of function

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Improve Calculations Speed

    Hi,

    Do you have Excel 2007 or later? If so you may find SUMIFS() work better than the SUMPRODUCT.

    However upload your workbook so that we can see in context. I see your comparing values in a horizontal range with numbers in a vertical list but can't quite see what results are required.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-29-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    58

    Re: Improve Calculations Speed

    Thanks for the reply - I am using Excel 2003.

    I have uploaded an example below.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Improve Calculations Speed

    Not really sure what that 1st SP is doing...
    =SUMPRODUCT(--(ISNUMBER(MATCH(K4:X4,$C$5397:$C$5724,0))))

    When I delete ONE 0730-1430 from column C, it drops from 14 to 12
    When I delete ONE 1400-2100 from column C, it drops from 14 to 13
    When I delete ONE AL from column C, it drops from 14 to 13
    When I delete all of those 3 criteria from column C, it drops from 14 to 9

    the 0730- and AL 7 seem to be doubled up in your counting anyway?

    What exactly are you trying to do here?

    =SUM(COUNTIF($C$5397:$C$5909,{"1400-2100","0730-1430","AL 7"}))
    this gives you 3
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    05-29-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    58

    Re: Improve Calculations Speed

    Thanks for the reply - this first SP is checking whether the 14 cells in the range are blank or appear on the list - it is weeding out any rogue data

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Improve Calculations Speed

    Have you considered using Data Validation to make sure only times you have are allowed inteh 1st place?

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Improve Calculations Speed

    Hi,

    SUMPRODUCT() functions are notoriously slow when large ranges are involved. It's a pity you don't have Excel 2007 or later when you could have used the much more efficient SUMIFS of COUNTIFS

    I'd be inclined to add a parallel set of columns and on each row enter the formula

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

    then copy this across 14 columns. Then the column Y total can be simply the sum of the 14 new columns. This should speed things up.

+ 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 assistance to improve speed in looking up value
    By a_driga in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-29-2015, 08:37 PM
  2. [SOLVED] Improve speed of Sort!
    By stockgoblin42 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-29-2013, 03:12 PM
  3. [SOLVED] Need to improve speed of concatenation macro
    By engineerlady in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-01-2013, 11:19 AM
  4. Improve speed on Trim function
    By TommyN in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-12-2013, 09:10 AM
  5. Urgent Help - Improve macro speed
    By Mysore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 11:38 PM
  6. How to improve web query speed
    By hegisin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2007, 12:40 AM
  7. Using an Array instead of a Vlookup to improve speed
    By Frank & Pam Hayes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2005, 03:05 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