+ Reply to Thread
Results 1 to 10 of 10

Slow time deleting filtered rows. Optimization help (sumproduct).

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Slow time deleting filtered rows. Optimization help (sumproduct).

    Hello,
    I have a quite big file of 30,000+ rows, a lot bigger than example in attachment. It's full of sumproduct formulas, It basically checks prices in sheet1 and adds them up in sheet2 to check how much employee earned and based on that what is going to be his salary(10% above minimum to earn + add on).
    My only problem with this file is that it takes too much time adding or deleting new row/column that's beetween formula range. For example if I would like to get rid of rows with [1]JobName1 by filtering them and deleting, it can take even up to 1 hour to do it for every single employee.
    Is there any way to make it work faster? Thank you for any help.
    Cross posted this problem at: https://www.mrexcel.com/forum/excel-...umproduct.html
    Attached Files Attached Files
    Last edited by Pojzon; 02-20-2018 at 03:40 PM.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Many functions many problems.

    My opinion on this subject:
    1. Prepare yourself a macro that will restore formulas
    2. Work on a sheet without formulas
    3. If they are needed, then restore them

    But if you change the ranges of the table you will have to correct the macros anyway, because most of your functions are different from each other and this does not allow for more automation, especially if you change the ranges in an unusual way.

    Can you do this, prepare a macro for restoring formulas (for this table layout that you provided) ?

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    I suppose that I could just leave formula with 1 employee, delete rest, add/del rows I need and just fix ranges in that one formula then drag it down to every other employee. Anyway, thank you for an idea.

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    With such a large number of complex formulas, the spreadsheet will always be slow.
    I see such a scheme of action:
    1. I write all employees (current employees at a given moment)
    2. I run a macro that introduces formulas for calculating "employee parameters"
    3. I run a macro that copies formulas into values
    4. Until something changes, I work on a sheet without formulas - the spreadsheet works faster without calculating formulas
    5. If I need to add another module (34 lines), I add it and repeat steps from 1 to 3

    But does a single module, from blue line ('Addon') to the last white line, before next blue line, ('[3]JobName10')) always have 34 rows as in your 'xlsx' file ?
    If not, then "kashanka" ... ... whatever it means, I hope nothing bad ... In that case, you'll have to make a database (access, sql, etc.), not excel file.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,859

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Quote Originally Posted by porucha vevrku View Post
    m
    But does a single module, from blue line ('Addon') to the last white line, before next blue line, ('[3]JobName10')) always have 34 rows as in your 'xlsx' file ?
    If not, then "kashanka" ... ... whatever it means, I hope nothing bad ... In that case, you'll have to make a database (access, sql, etc.), not excel file.
    It does have always the same amount of rows yes (34 in this case). As I though it wouldn't be as practical as I wish to make it work in excel. Anyway I think I can live with deleting and fixing formula from time to time.
    Thank you for help.
    Edit: also sorry for breaking the rules, edited my first post.

  7. #7
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Try,
    Formulas and their columns as constants.
    Build formulas in a such way the addresses were not permanently set when you increase the number of columns and rows (it is not always possible).
    The code is too long, I do not paste it (you will find it in the attachment).
    With 30,000+ rows, you can "wait for a while".

    ps:
    A formula such as:
    =If(OR(C2="AAAA",C2="BBBB",C2="CCCC",C2="DDDD"),"Something","")

    may be slightly shortened:
    =If(OR(C2={"AAAA","BBBB","CCCC","DDDD"}),"Something","")
    Attached Files Attached Files
    Last edited by mjr veverka; 02-19-2018 at 06:36 PM.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Quote Originally Posted by porucha vevrku View Post
    If not, then "kashanka" ... ... whatever it means, I hope nothing bad ...
    in short: brothel in data (in this case)

  9. #9
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Wink Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    Thanks, sandy666 ... ... but it was just a light joke ... ... normally/usually it does not have "such an overtone" in Slavic languages:
    Pravdepodobne iba obycajny neporiadok ... jaternica alebo krvavnicka nie je zla
    https://en.wikipedia.org/wiki/Kaszanka
    Btw, have you ever eaten black pudding, with onion and warm ?
    I recommend ...
    Regards

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Slow time deleting filtered rows. Optimization help (sumproduct).

    @porucha vevrku
    I like "kashanka" fried with onion and Heineken for this

+ 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: 10
    Last Post: 06-07-2018, 04:16 PM
  2. [SOLVED] Deleting rows by specific values very slow
    By Vaslo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2017, 01:37 PM
  3. Deleting rows = VERY SLOW RUN TIME
    By karacooks in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-02-2016, 09:49 PM
  4. [SOLVED] Deleting filtered rows
    By ArnolddG in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2014, 07:49 AM
  5. Replies: 4
    Last Post: 06-11-2010, 03:29 PM
  6. Replies: 1
    Last Post: 01-11-2006, 11:30 PM
  7. Help!!! I have problem deleting 2500 rows of filtered rows
    By shirley_kee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2006, 11:20 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