+ Reply to Thread
Results 1 to 19 of 19

Too many SUMIFs cripples computer?

  1. #1
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Too many SUMIFs cripples computer?

    I have 15,000 rows of data that I am checking to populate three tabs one 600 rows, one 137 rows and the last 12. But every dealer has a row and every model has a column and the 15,000 data entries populate them all.

    I concatenated the dealer #, Model, & Program # to create unique variables for SUMIF to populate everything and it does, but I have to shut everything else down and it runs very slowly. I watch the Calculating % creep up... It was put together in a rush. THere are no links and CTRL END reveals no excess rows or columns. Is this just the reality of SUMIF or is there something else to look for? Any other recommendations to populate a cartesian plain from a data dump out of SAP?

    Any suggestions are welcome, Sales MGR complaining his computer is crippled too, I plan to copy and paste after latest data dump but don't want to have to keep doing that if possible...

    Cheers
    Grasstoe

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Too many SUMIFs cripples computer?

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Too many SUMIFs cripples computer?

    I am not a huge fan of Pivot Tables... but this sounds like a viable alternative. In the absence of any sample data, I can't do much more...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,826

    Re: Too many SUMIFs cripples computer?

    700+ sumifs of unknown # of operations per sumifs over a database of 15000 records could easily run into a lot of operations and take a while to calculate.

    Assuming that your source data is in a good database format, can you run three pivot tables off of the source data instead? Pivot tables are (almost) always faster than worksheet functions. https://www.excel-easy.com/data-****...ot-tables.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    I think I have rendered this into a small enough sample, I have the full version open at the same time and it is painful to wait for it to finish saving. The Summary tab shows all the order taken for each dealer populated from the Data tab... on the fully loaded version every column is doing this, there are a lot more dealers and models, but this should give one the gist...

    Thank You so much!!
    Grasstoe
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    There are more tabs that further summarize the three lists of dealers, but a variety of pivot tables could generate a decent answer. There are aspects though were a dealers recommended order is only counted when they submit their actual order using {formulas} but it is definitely worth exploring...

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Too many SUMIFs cripples computer?

    I've no idea what your last post means, but this seems to have the same answers
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Only that what I attached is the part of a more complicated workbook that contains the issue I believe is slowing me down...

  9. #9
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Sorry the {formula} was meant to be an Array Formula and the name was eluding me. I have a recommended order for all dealers but I care about our achievement during the order period based on how we are doing with orders against only their recommended orders rather than against all dealers recommended orders. As such I have cells that only populate when a dealer submits an order, and on my report tab that in turn triggers my array formula to include the recommended order for that dealer or not... I inherited this and normally we populate it manually this time we are trying to populate it from data in our system as dealers order online instead of on paper... I did it in a rush and I wish I had a better answer, But perhaps my Dealer tabs for each row could be answered by pivot tables. SOmetime I have difficulty accessing data from a pivot table out to a seperate summary, but I will have to play with it.

  10. #10
    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,929

    Re: Too many SUMIFs cripples computer?

    Another option might be to use helper column/s to do some of the heavy lifting.
    And if you are indeed using ARRAY formulas, as you suggest, dont use full-column references, rather use just the range you need - or if that can grow, then 2-3 times what you think you will need.
    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

  11. #11
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Too many SUMIFs cripples computer?

    I can tell you after a few moments looking at your sample that you have issues in your main file. Unless you deleted a bunch of stuff on the sheets in the examples you have excess contents and formatting that I would bet are slowing things down to a crawl.

    Make sure that the used range on each sheet is actually the intended used range and that the used range doesnt go way beyond your actual data.

    Also your COUNTIF's start with a multiple column range to check the criteria in, is this actually required in your real file or is all the criteria you are checking for in a single column on the data sheet (like A1:A15201)? If its all a single column on the data sheet, then change the range of the criteria range argument to a single column. This would drastically reduce the number of cells to check 6 fold.

    Once you get things cleaned up in the file you may want to rebuild the calc chain as even in your sample its enormous. I think its CTRL+ALt+SHift+F9, but google it first to be sure.

    Between clearing out the used range to just your actual data (and the formatted cells to being just in your used range) and correcting the COUNTIF to a single column for criteria range (along with rebuilding calc chain) it should speed up quite a bit.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  12. #12
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Too many SUMIFs cripples computer?

    Also after running Inquire | Workbook Analysis I see you have alot of formulas like:

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


    This could be done instead simply using number formats. You could do it in the C column and eliminate the need for this formula and column entirely or keep the column, simply reference the C columns cell ex: =C3727 and then just format the cell the reference is in as "000000", which would ensure any entry was at least 6 digits with leading 0's. IE: 1 = 000001, 12 = 000012, 123 = 000123, 1234 = 001234, etc until 123456 = 123456.

    Alternatively, if you need the leading 0's in the cell, use =TEXT(C3727, "000000") instead, again much more efficient.

    This would have a much lower impact on calc times than your formula does.

    You have 29,000 formulas in your workbook and the vast majority of them are this IF(CONCATE(LEN mess.

    Also, back to the matter of excess (formats and cells/content) clearing both made your sample go from 923k to 584k in file size with no other change on my part. So the file is 36.7% smaller in file size now just by clearing the excess out and leaving all the same data as in your sample. Thats a huge difference and would certainly help with load times and likely calc times too.

    EDIT: replacing all the IF(CONCAT(LEN formulas with =TEXT reduced the file size another ~20ish kb (due to simplifying the calc chain) and reduced the calc chain in its uncompressed state around 100kb, so file size of ~566k.
    Last edited by Zer0Cool; 08-23-2018 at 05:07 PM.

  13. #13
    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,929

    Re: Too many SUMIFs cripples computer?

    I did away with Data col B altogether, and used this in A7...
    A7=IF(C7="","",TEXT(C7,"000000")&E7&H7)
    copied down

    I see you have a lot of SUBTOTAL formulas in Summary row 1. Im not sure of the performance diffs, but that could be SUM() - instead, unless you intend hiding rows later?

  14. #14
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    I am not usually a fan of pivot tables either but I am drooling over how well this works now! GetPivotData worked like a charm!
    Thank You!
    Grasstoe

  15. #15
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Quote Originally Posted by MrShorty View Post
    700+ sumifs of unknown # of operations per sumifs over a database of 15000 records could easily run into a lot of operations and take a while to calculate.

    Assuming that your source data is in a good database format, can you run three pivot tables off of the source data instead? Pivot tables are (almost) always faster than worksheet functions. https://www.excel-easy.com/data-****...ot-tables.html
    The data exceeded 15,000 last time through so I found and replaced all the 15,000s with 20,000 and there were over 150,000 updates so yes Sumif worked but it was terribly inefficient. Pivot Tables and GetPivotData got me so excited I had to drag someone into my office and show them how well it worked, with no functionality delay!!
    Thank YOU

  16. #16
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Quote Originally Posted by FDibbins View Post
    Another option might be to use helper column/s to do some of the heavy lifting.
    And if you are indeed using ARRAY formulas, as you suggest, dont use full-column references, rather use just the range you need - or if that can grow, then 2-3 times what you think you will need.
    I am not sure what a helper Column is? I ended up creating pivot tables and using getpivotdata to arrange the data the way I needed...the array formulas are very specific so I don't think they are the delay but good to keep in mind...

    Thank you
    grasstoe

  17. #17
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Quote Originally Posted by Zer0Cool View Post
    Also after running Inquire | Workbook Analysis I see you have alot of formulas like:

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


    This could be done instead simply using number formats. You could do it in the C column and eliminate the need for this formula and column entirely or keep the column, simply reference the C columns cell ex: =C3727 and then just format the cell the reference is in as "000000", which would ensure any entry was at least 6 digits with leading 0's. IE: 1 = 000001, 12 = 000012, 123 = 000123, 1234 = 001234, etc until 123456 = 123456.

    Alternatively, if you need the leading 0's in the cell, use =TEXT(C3727, "000000") instead, again much more efficient.

    This would have a much lower impact on calc times than your formula does.

    You have 29,000 formulas in your workbook and the vast majority of them are this IF(CONCATE(LEN mess.

    Also, back to the matter of excess (formats and cells/content) clearing both made your sample go from 923k to 584k in file size with no other change on my part. So the file is 36.7% smaller in file size now just by clearing the excess out and leaving all the same data as in your sample. Thats a huge difference and would certainly help with load times and likely calc times too.

    EDIT: replacing all the IF(CONCAT(LEN formulas with =TEXT reduced the file size another ~20ish kb (due to simplifying the calc chain) and reduced the calc chain in its uncompressed state around 100kb, so file size of ~566k.
    Imagine my hand slapping my forehead! I deal with the digit issue a lot so fixing using formating sounds great. Using the Pivot table idea I can delete all those unnecessary references... Thanks for posting and looking into my mess, I will definitely use that idea in the near future.

    Thank YOU!

  18. #18
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Too many SUMIFs cripples computer?

    Why don't you like Pivot Tables?

  19. #19
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Too many SUMIFs cripples computer?

    Quote Originally Posted by Kyle123 View Post
    Why don't you like Pivot Tables?
    Trying to learn from all the posts I deleted Columns A & B from my Data but then discovered that my 16,000 rows were using a dealer # formated as text. So I needed another column to pad the leading zeroes. I was able to update the pivot tables very quickly but I had to redo all the GetPivotTable references even though the data was in the same location... More than anything I use them so rarely even though they are regularly very helpful that I always feel like I am starting over. I need to just immerse myself and get over it...

+ 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. Replies: 3
    Last Post: 05-18-2018, 08:20 AM
  2. Other Computer waits until the first computer open the file close it.
    By atzdgreat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2017, 05:42 AM
  3. Replies: 2
    Last Post: 04-24-2017, 04:15 PM
  4. Replies: 6
    Last Post: 06-28-2013, 08:44 PM
  5. Replies: 0
    Last Post: 02-08-2010, 03:17 PM
  6. Auto Filter on my home computer differs from my work computer.
    By Sbova0226 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2009, 03:04 PM
  7. Replies: 2
    Last Post: 12-19-2005, 11:23 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