+ Reply to Thread
Results 1 to 6 of 6

SUMIF Alternative to reduce processing time

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    SUMIF Alternative to reduce processing time

    I have a functioning spreadsheet, which uses multiple SUMIFS to organise a table of data from multiple lines per employee into single lines per employee. The issue is, there are many rows and it requires around 250000 SUMIFS to work, which obviously means it takes a huge amount of time to process. I'm wondering if anyone else can suggest a better solution which could reduce this. I'm happy to use VBA, but my skills with it are quite limited.

    The data shows employee information, shift start/end times and durations. Because of the way it's exported, these are on multiple lines, and I need to show them on one line only. For each employee, the only variation between the rows are the shift times.

    The attached sheet shows the data I start with (the top table) and how I need it to be (the bottom table). For each employee, there will only ever be one shift per day (so there isn't the possibility of two lines for one employee to both show duplicate or different shifts.

    Thanks in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: SUMIF Alternative to reduce processing time

    Assuming the layout is EXACTLY as shown and we can just remove the "results" section at the bottom to make the changes to the original data, run this on a copy of your sheet:

    Please Login or Register  to view this content.
    It uses SUMIF, but only once per ID (on the first row) and only going down 7 rows.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: SUMIF Alternative to reduce processing time

    The version above froze up for a long time when trying to delete 100k unneeded random rows. THis seems to work better.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: SUMIF Alternative to reduce processing time

    Hi,

    The sheet that I posted was actually a mock up of the results I need. The actual data will need to be across two sheets. The first one is essentially the top table, and the second sheet is where I need the data sorted into one line to go. They are identical in layout.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: SUMIF Alternative to reduce processing time

    Simply copy the data from the first the to the second sheet, run the macro on the second sheet to merge it down to the final layout you wanted. The data is merged down into the row that have numbers in column B.

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: SUMIF Alternative to reduce processing time

    Thanks for your help.

+ 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. Reduce time in processing multiple excel sheets
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2014, 06:00 AM
  2. Reduce processing time for processing multiple excel sheets
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 09:25 AM
  3. Reduce processing time for saving excel sheets located in a folder
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 05:28 AM
  4. Alternative to SUMIF
    By ltmaiyk in forum Excel General
    Replies: 2
    Last Post: 01-22-2010, 12:06 AM
  5. Calculate processing time with fixed time paramaters
    By Apel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2009, 08:54 AM
  6. SUMIF Alternative
    By rwall in forum Excel General
    Replies: 1
    Last Post: 04-05-2009, 07:21 PM
  7. Reduce processing load in Excel
    By Lance Gray in forum Excel General
    Replies: 0
    Last Post: 12-29-2005, 01:30 PM
  8. SUMIF Alternative?
    By qflyer in forum Excel General
    Replies: 1
    Last Post: 06-20-2005, 02:05 AM

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