+ Reply to Thread
Results 1 to 5 of 5

LF code to sum multiple rows of data and combine into one row

  1. #1
    Registered User
    Join Date
    10-01-2008
    Location
    Park City
    Posts
    59

    LF code to sum multiple rows of data and combine into one row

    The spreadsheet attached shows 2 worksheets. Worksheet "Sales-Original" is how I receive the data. I need to convert that data to the format in Worksheet "Sales-Final".

    The workbook only contains a sample of de-identified data with some random numbers I'm using to develop a process. The actual sheet is several hundred lines long.

    The conversion I'm looking for needs to do a couple of things:
    1) Sum all the sales for 1 location for all sales people.
    2) Determine when the last time there was sales at that location
    3) Determine total sales in 2014 for all sales people (if there were any sales)

    Thanks,

    GG
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: LF code to sum multiple rows of data and combine into one row

    was actually last that caused the most issue
    created total column as helper...just makes life easier

    location done by simple if formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    the last i did with a macro, could be done with some sort of array formula but this macro is simple to understand
    Please Login or Register  to view this content.
    the tables themselves is combination of sumif or Max/if using CSE formula
    could probably stream line the setting up of total and location into the macro was well if this solution found to be useful
    Attached Files Attached Files
    Last edited by humdingaling; 06-19-2014 at 09:34 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: LF code to sum multiple rows of data and combine into one row

    Please Login or Register  to view this content.
    Code refined to do data entry at once
    Attached Files Attached Files
    Last edited by humdingaling; 06-19-2014 at 09:45 PM.

  4. #4
    Registered User
    Join Date
    10-01-2008
    Location
    Park City
    Posts
    59

    Re: LF code to sum multiple rows of data and combine into one row

    Humdingaling,

    That's a smart way to approach it. I think I'll start with your code and see if I can roll it all up into a macro. It's a sheet that will be run by someone else and I'd like to just put a button on the sheet to do the conversion. I'll think about it some more tomorrow but you have given me an awesome start. Thank you.

    GG

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: LF code to sum multiple rows of data and combine into one row

    not problem
    i the only part left filling out the sales final section (just because i dont know how you want it in the end) or you can just leave it like i have as 0 and the formulas update when you run the macro

    if you have issues with it, please come back to this thread i will leave it subscribed

    else if you find solution just mark it solved


    Cheers
    hum

+ 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: 6
    Last Post: 02-19-2014, 10:25 AM
  2. Replies: 8
    Last Post: 11-25-2013, 10:26 PM
  3. Macro to combine data from multiple rows
    By mummafrog in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-03-2012, 10:21 PM
  4. Trying to combine multiple rows of data into one
    By julhennessy in forum Excel General
    Replies: 6
    Last Post: 09-17-2012, 02:40 PM
  5. Combine Data from Multiple Rows
    By rhudgins in forum Excel General
    Replies: 3
    Last Post: 10-07-2011, 10:38 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