+ Reply to Thread
Results 1 to 5 of 5

Transpose and sum with conditions

  1. #1
    Registered User
    Join Date
    06-26-2016
    Location
    Barcelona
    MS-Off Ver
    Office 2007
    Posts
    21

    Transpose and sum with conditions

    Hello, I'm trying to transpose and sum with the following criteria:

    LOGIN DATE ACT MAP
    1 11/02/2008 149 3
    1 11/02/2008 18 1
    1 11/02/2008 18 1
    1 11/02/2008 18 5
    1 13/02/2008 145 2
    1 13/02/2008 43 3
    2 13/02/2008 19 0
    2 13/02/2008 18 1
    2 14/02/2008 18 1
    2 14/02/2008 18 1
    3 14/02/2008 39 1
    3 15/02/2008 149 0
    3 15/02/2008 43 0
    3 15/02/2008 19 1
    3 15/02/2008 19 1


    I have to create a row for each LOGIN and DATE and a column with the ACT values and the sum of their respective MAP values. In the middle separated by : I have to create the sum of all the MAP values, as follows:

    1 11/02/2008 149 18 : 10: 3 7 This is the first row that I should create because 149 and 18 are the ACT values for this LOGIN and DATE, 3 = MAP value for ACT 149 and 7 is the sum of the MAP values for ACT 18, 7=1+1+5, in the middle the 10 value = 3+7)
    1 13/02/2008 145 43 : 5: 2 3
    2 13/02/2008 19 18 : 1: 1 0
    2 14/02/2008 18 : 2 : 2
    3 14/02/2008 39 : 1 : 1
    3 15/02/2008 149 43 19 : 2 : 0 0 2

    In my try I'm first transposing to create the rows but don't have enough programming background for that and cannot do this by hand because there are about 20000 rows!
    Attached Files Attached Files
    Last edited by anahochmanova; 06-26-2016 at 08:42 AM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: Transpose and sum with conditions

    would a pivot table work , seems to be what you are after

    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: Transpose and sum with conditions

    have a look at the attached I have used you example and a pivot table
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-26-2016
    Location
    Barcelona
    MS-Off Ver
    Office 2007
    Posts
    21

    Re: Transpose and sum with conditions

    Thanks to @etaf now I almost have it, I attach the datapivoted.xls that looks like the following table
    Now how could I concatenate the values of a column until I find a blank row? For example I need to create 18 149 10 7 3 for the first group until the first blank

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Transpose and sum with conditions

    Does this help any?

    Please Login or Register  to view this content.

+ 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. Transpose variable based on 2 conditions
    By jam320 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-13-2015, 11:00 AM
  2. Transpose swipe timings based on 3 Conditions
    By vasu2007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2015, 01:17 PM
  3. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  4. [SOLVED] Transpose column to rows based on conditions
    By thaykhov in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2013, 02:35 AM
  5. Transpose values from column to rows (one cell) with conditions
    By zeko90 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 08:21 AM
  6. [SOLVED] Transpose: How can I copy a list and transpose it but leaving 3 cells in between each item
    By cocolete in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-11-2012, 10:01 AM
  7. Replies: 2
    Last Post: 02-19-2007, 04:53 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