+ Reply to Thread
Results 1 to 4 of 4

Dynamic VBA Sumif on Large Data - Very slow

  1. #1
    Registered User
    Join Date
    02-02-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Dynamic VBA Sumif on Large Data - Very slow

    Hi all,

    I have put a sumif in VBA and currently it is too slow for what i need it to do.

    Data sheet
    Date Category AM PM
    01/01/2019 Red 20 50
    02/01/2019 Blue 10 17
    02/01/2019 Red 5 7

    SumIF summary table:

    Date AM PM
    01/01/2019 20 50
    02/01/2019 15 24
    03/01/2019 0 0

    The above tables are simplified however the data is similar - the data is one sheet and the summary sheet is in a similar format - the columns will be identifical so might help with looping the data. The table structure is almost identical in the data sheet and the summary sheet in terms of columns
    Here is the code that i have so far but is very slow. I loop every column and row in the summary sheet and put a sumif in their, as the column changes in the summary sheet so does the data sheet as the column structure is the same.

    Basically in the summary sheet i want sumif based on the date and as the loop changes column in the summary sheet, so does the sum range in the data sheet as the columns are the same so i dont need to check the criteria in the columns AM/PM

    Please Login or Register  to view this content.
    Any help appreciated

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Dynamic VBA Sumif on Large Data - Very slow

    You can use Pivot tables, or use sumif function in VBA instead of looping. Could you attach a sample which mimcks your real data?

  3. #3
    Registered User
    Join Date
    02-02-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Dynamic VBA Sumif on Large Data - Very slow

    Hi,

    Example file attached of data layout

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Dynamic VBA Sumif on Large Data - Very slow

    Please Login or Register  to view this content.

+ 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] SUMIF in multiple columns is slow with large data
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-30-2017, 07:29 AM
  2. ExecuteExcel4Macro Pulling data from a Cell in Closed Workbook - slow for large File :(
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2016, 12:35 PM
  3. Large spreadsheet SO SLOW!
    By st0rch in forum Excel General
    Replies: 5
    Last Post: 06-20-2016, 02:54 PM
  4. [SOLVED] Solving Large function for dynamic data based on changing periods
    By Darren_Rix in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2013, 04:59 AM
  5. Large data....slow excel performance..!!
    By Aryaa Dixit in forum Excel General
    Replies: 9
    Last Post: 01-07-2009, 03:39 AM
  6. Extremely slow excel with charts containing large amounts of data
    By EmnaX in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-19-2007, 07:37 PM
  7. Simple worksheet becomes large and slow
    By Judy in forum Excel General
    Replies: 4
    Last Post: 05-10-2005, 06:06 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