+ Reply to Thread
Results 1 to 6 of 6

Condensing several rows of data into a single row

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Condensing several rows of data into a single row

    Hello

    As the title says, then I want to condense several rows of data into a single row.

    The layout of my data can be seen in example1.

    Any help would be greatly appreciated, thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Condensing several rows of data into a single row

    Put this formula in I27:

    =SUMPRODUCT((TEXT($B$4:$B$20,"mmyy")=TEXT(I$25,"mmyy"))*($C$4:$C$20=$H27),($D$4:$D$20+$E$4:$E$20))

    then copy across and down. If you don't want the zero values to show, you can apply conditional formatting so that if the cell content is zero use a white font.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Condensing several rows of data into a single row

    In I27 use

    =SUMPRODUCT($D$4:$D$20+$E$4:$E$20,--(DATE(YEAR($B$4:$B$20),MONTH($B$4:$B$20),1)=I$25),--($C$4:$C$20=$H27))

    Copy across and down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    10-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Condensing several rows of data into a single row

    Thank you both very much.

    Pete, your formula seemed to have an error where it did not take years into account, so it would sum up the values for e.g. December 2011 and December 2010.

    Ace, your formula worked perfectly.

    Cheers!

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Condensing several rows of data into a single row

    I've attached the file that I worked on - it seems okay to me.

    Pete
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-01-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Condensing several rows of data into a single row

    Hmm, maybe it is just that one item in cell R27 then? Now that you mention it, the other numbers look fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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