+ Reply to Thread
Results 1 to 4 of 4

Too Many Sumproducts Freezing Up Excel?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    New York, NY
    MS-Off Ver
    Office 2010 Professional
    Posts
    2

    Too Many Sumproducts Freezing Up Excel?

    Hi Guys,

    First post both here and Mr. Excel, sorry for any missed protocol. I have a workbook wherein one sheet has a column with dates, a column with people's names and columns with times people clocked in and out. On another sheet in the workbook is a column of all the transactions and columns of times and columns of days those transactions were posted. On a third sheet I listed a column of dates, then used sumproduct to match people that clocked in and out on each particular date and pull out the times. I possibly could have done this with vlookup if each person had their own sheet but for now since I'm trying to pull out both the person and date I only know how to do this using sumproduct. Using another sumproduct formula I'm counting all the transactions that occurred between the in and out time for a particular person, so that in the end I have a list of each date, along with the times each person clocked in and out and the total of transactions during that time period.

    The problem is, while this seems to work at the basic level, it keeps crashing my computers. I see all 8 of my processors running at full capacity trying to process this, and then I get an error that I ran out of memory. Some of the calculations appear there, but others are not filled in where they should be. If I restart the computer, just open excel, the same thing happens. I'm on Windows 8 with an i7 haswell laptop and 8 gigs of ram. The file is only 450kb, with like a max of 400 rows on each sheet. I did autofill the sumproducts down to 365 rows for a full year, and there are maybe 8 people that I am pulling this information on.

    Let me know if there's anything else I can provide on this. Thanks,

    Nila

  2. #2
    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
    53,048

    Re: Too Many Sumproducts Freezing Up Excel?

    Hi, welcome to the forum

    1. in your SP formulas, are you using full column ranges? (A:A etc) If so, change them to cover just the ranges you need...A1:A400
    2. Have you considered using some of the other, more efficient functions excel 2010 provides?
    - sumif/sumifS
    - countif/countifS
    - averageif/averageifS
    (among others)

    Can you provide a few samples of your SP formulas, or, better yet, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  3. #3
    Registered User
    Join Date
    03-24-2015
    Location
    New York, NY
    MS-Off Ver
    Office 2010 Professional
    Posts
    2

    Re: Too Many Sumproducts Freezing Up Excel?

    Hi,

    Thanks for your quick reply on this. I took a bit to convert all the sumproduct to sumifs and scaled back the ranges to 50000 rows instead of the entire column and yes that did help quite a bit. Now it's not giving me a memory error, and even on a less powerful computer I'm able to get my results. Basically now if I copy and paste 1500 rows of new data I just have to wait a minute for it to compute, but it is working and that's the important thing. If it helps someone going forward I could upload samples of the work, but I would have to take some time to clean the file up first so for now I'll share the formulas I used.

    =SUMIFS(Data!$F$2:$F$50000,Data!$A$2:$A$50000,$A3,Data!$B$2:$B$50000,">"&(SUMIFS(Master!$AH$2:$AH$10000,Master!$X$2:$X$10000,B$1,Master!$Y$2:$Y$10000,B$2,Master!$AG$2:$AG$10000,$A3)),Data!$B$2:$B$50000,"<"&(SUMIFS(Master!$AI$2:$AI$10000,Master!$X$2:$X$10000,B$1,Master!$Y$2:$Y$10000,B$2,Master!$AG$2:$AG$10000,$A3)))

    A3 is the date I'm gathering data for, which I have from 1/1/15 to 12/31/15.
    B$1 is the person I am gathering info on.
    B$2 is the department I am gathering info on as sometimes people work in 2 different ones.
    The Master sheet contains AH and AI, the in and out time of the person, which I am using to search against the transactions in the larger portion of the formula. It also contains X the name person who clocked in, Y the department of the person, and AG the date of the clocking in and out.
    The Data sheet contains transaction info (F is transaction total, A is date, B is time of transaction), so I'm adding total of transactions where the date matches what's written, and time of the transaction is between the start and end time of the person.

    Thanks,

    Nila

  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
    53,048

    Re: Too Many Sumproducts Freezing Up Excel?

    Im happy it helped out a bit for you

    Another thing to consider/test, is using helper columns to combine some of those criteria. For instance, you could have a helper that combines the name and department, (not sure you could combine the date), and then use 2 criteria instead of 3.

    Likewise, do the same combo on the other sheet, and Im not quite following the internal sumifs() you have there, but perhaps they could be in some sort of helper column too.

    Another trick I have used with larger databases - if you have historic data that wont change, convert any formulas that use (just) that data, to values...every bit helps

    Im not positive these will speed things up, but as you saw, the less complex formulas you have, the more efficient your process becomes.

    Oh, and points I forgot to add...
    - avoid the use of too many volatile formulas like TODAY()...if you use this in a lot of formulas, consider putting TODAY() in its own cell and referencing that cell. There is a good discussion about them here...
    http://www.decisionmodels.com/calcsecretsi.htm
    - avoid excessive use of Conditional Formatting, that can drag your file down to a standstill

+ 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. Sumproducts ???
    By CarloF in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-20-2015, 09:55 AM
  2. look ups and sumproducts i think...
    By Naz19 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2012, 01:54 PM
  3. [SOLVED] subtotal of sumproducts?
    By Alanmac in forum Excel General
    Replies: 3
    Last Post: 05-14-2012, 08:12 AM
  4. Sumproducts issue
    By wisconsin262 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-11-2008, 09:08 AM
  5. SUMPRODUCTS
    By AJP in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-14-2006, 01:15 PM

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