+ Reply to Thread
Results 1 to 9 of 9

How to condense data to single rows on a different sheet

  1. #1
    Forum Contributor
    Join Date
    03-11-2018
    Location
    Tampa, Florida
    MS-Off Ver
    365
    Posts
    105

    How to condense data to single rows on a different sheet

    I have a "Raw Data" sheet with columns and columns of data. It has many blank cells throughout the sheet. I want to condense the multiple rows based on specific variables. In similar past efforts, I used a similar formula (below) with great success:

    =IF($A11="","",SUMIF('Raw Data'!$FA$2:$FA$200,$A11,'Raw Data'!T$2:T$200))

    It doesn't work this time and I'm not sure why, maybe because my data this time includes text??? I have attached a sample workbook for review. The "Raw Data" sheet contains data in actual column location. Sheet 1 is my desired output and the formula I referenced. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to condense data to single rows on a different sheet

    Yes. It' all text and text has numeric value of 0.

    If you find means to convert those to meaningful numbers (using data column T as a helper column?) your formula should work.
    Dave

  3. #3
    Forum Contributor
    Join Date
    03-11-2018
    Location
    Tampa, Florida
    MS-Off Ver
    365
    Posts
    105

    Re: How to condense data to single rows on a different sheet

    Unfortunately I can't. Sometimes they will be "1A", "2D", etc.

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

    Re: How to condense data to single rows on a different sheet

    You can use a helper column in the Raw Data sheet (e.g. column FB), with this formula in FB2:

    =IF(T2="","-",MAX(FB$1:FB1)+1)

    Copy this down to the bottom of your data.

    Then you can use this formula in cell A11 of the Desired Results sheet:

    =IFERROR(INDEX('Raw Data'!FA:FA,MATCH(ROWS($1:1),'Raw Data'!FB:FB,0)),"")

    and this one in G11 of that sheet:

    =IFERROR(INDEX('Raw Data'!T:T,MATCH(ROWS($1:1),'Raw Data'!FB:FB,0)),"")

    Copy these two formulae down until you start to get blanks.

    Hope this helps.

    Pete

    EDIT: You will need to format G11 as General before you put that formula in.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to condense data to single rows on a different sheet

    Another thought.

    Since the probabilities always line up with the last entries of 'Subject' enter this in G11 and fill down until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It of course does not return a numeric value, but matches what is shown expected in the upload.

  6. #6
    Forum Contributor
    Join Date
    03-11-2018
    Location
    Tampa, Florida
    MS-Off Ver
    365
    Posts
    105

    Re: How to condense data to single rows on a different sheet

    Pete, this worked beautifully! Thank you!
    Last edited by dvess11; 04-11-2019 at 06:29 AM. Reason: To: Pete

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: How to condense data to single rows on a different sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    03-11-2018
    Location
    Tampa, Florida
    MS-Off Ver
    365
    Posts
    105

    Re: How to condense data to single rows on a different sheet

    Pete, I have 2 follow-up questions for you.

    #1 - In my example, I had (6) "1"s, (2) "2"s, (6) "3"s, etc in Column FA. Will your helper column formula
    [=IF(T2="","-",MAX(FB$1:FB1)+1)] work if I have fewer or greater number of "1"s?

    #2 - Your solution works beautifully on the rows corresponding to the rows you made numeric. However, I need to pull some data from rows that are a "-" versus numeric (computed by your helper formula). Do I need to make a 2nd helper column for those rows or change my methodology entirely?

    Thank you!

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

    Re: How to condense data to single rows on a different sheet

    The answer to question 1 is YES, but it is easy enough for you to try it and see.

    I'm not sure what you mean by question 2, as you get a hyphen on the rows where column T is empty, so what would you want to do with those? It might be best to upload another example workbook which illustrates your latest queries.

    Hope this helps.

    Pete

+ 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: 1
    Last Post: 04-06-2016, 07:02 AM
  2. VBA Excel 2013 - Count data rows on single sheet, divide by 3 , color band rows.
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2015, 01:33 PM
  3. Copy data into a single row horizontally from another sheet with multiple rows
    By skilaru in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2012, 02:25 PM
  4. Replies: 8
    Last Post: 11-20-2011, 09:48 AM
  5. Condense several rows to one
    By Biased Historian in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-30-2010, 11:40 AM
  6. macro to condense rows of data to single row
    By lax in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2009, 06:21 PM
  7. Looking to condense rows
    By mstieler in forum Excel General
    Replies: 3
    Last Post: 05-29-2009, 05:40 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