+ Reply to Thread
Results 1 to 4 of 4

Extract data from multiple columns, group and sum up unique values

  1. #1
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    38

    Extract data from multiple columns, group and sum up unique values

    Hello guys,

    I need to find the formula which could extract unique data from multiple columns by Code, and sum up Hours, and sort it out the type,

    So the result would show me the sum for unique codes , grouped into Types:

    GSQ01
    - Type 1 - 4
    - Type 2 - 0
    - Type 3 - 0
    GSQ02
    - Type 1 - 0
    - Type 2 - 7
    - Type 3 -4
    GSQ03
    - Type 1 - 5
    - Type 2 - 2
    - Type 3 - 8

    ( dont know if I calculated right , this is the main problem that it easy to make mistakes doing it manually.)

    There would be only 3 types, and many different codes, unique and duplicates.

    The document has blank rows and coulmns too, but for the start, I would be grateful if you could help me out with finding solution to this problem first.


    Type Code HRS Code HRS
    Type1 GSQ01 2 GSQ01 2
    Type2 GSQ02 5 GSQ02 2
    Type3 GSQ02 4 GSQ03 4
    Type1 GSQ03 5 GSQ04 5
    Type2 GSQ03 2 GSQ03 7


    Many thanks,

    Aivaras

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: Extract data from multiple columns, group and sum up unique values

    Assuming that your data is in columns A to E of your sheet, as you show in your bottom table:

    Select column A and copy it, then right click column D and choose Insert copied cells. Then grab from D2 to the end of column F, and drag it under the values in column A, and delete columns D to F.

    Then select A:C and choose Insert / Pivot table, and place the pivot table on a new sheet. Select Code as a row field, Type as a row field, and HRS as the data field, and you are done.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    38

    Re: Extract data from multiple columns, group and sum up unique values

    Thank you for your solution, but the problem is, that I will have new timesheet ( new timetable) everyday, and it would still take a lot of time to rearrange it. The formula I came up with is =SUMIFS($M$4:$M$10,$L$4:$L$10,E19,$K$4:$K$10,F18)
    based on 2 criteria, and it works well , except that its only works for 1 column of data, not multiple, and I also need dynamic range for unique values, so every time I get different codes it would automatically extract and sort the information.
    Last edited by Alcotraz; 08-05-2015 at 06:18 PM.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: Extract data from multiple columns, group and sum up unique values

    Try changing to this is get the second set of data - not sure what ZZZ, XXX, and YYY should be....

    =SUMIFS($M:$M,$L:$L,$E19,$K:$K,F$18)+SUMIFS($ZZZ:$ZZZ,$XXX:$XXX,$E19,$YYY:$YYY$,F$18)

+ 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: 8
    Last Post: 09-12-2013, 09:17 AM
  2. [SOLVED] Extract Unique Values from Multiple Lists
    By sskgintl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-27-2013, 06:46 PM
  3. [SOLVED] Extract unique values from 2 columns DYNAMICALLY
    By albatr0n in forum Excel General
    Replies: 17
    Last Post: 08-28-2012, 08:42 AM
  4. Replies: 3
    Last Post: 06-24-2012, 01:19 PM
  5. group unique values on multiple colums
    By sharmaremuk in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-21-2011, 03:10 AM
  6. Replies: 1
    Last Post: 03-02-2011, 04:14 PM
  7. Replies: 7
    Last Post: 07-13-2009, 01:30 PM

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