+ Reply to Thread
Results 1 to 5 of 5

Reformat data to remove blanks

  1. #1
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Reformat data to remove blanks

    Hello,
    I have a spreadsheet (attached) that I need to clean-up.

    The spreadsheet contains the free text responses from a 14 question survey. If a respondent did not leave a comment there is a blank. For each question this leaves an inconsistent spacing between the respondents.

    I have no need to be able to tie back a comment to the specific respondent so to facilitate categorizing and analyzing the data I would like to reformat the data so each question is continuous list of actual responses.

    I know how to find empty cells or rows and delete them; however, that doesn't help me here.

    The spreadsheet I've attached shows what the data currently looks like (RAW) and what I'm trying to do (FINAL).

    Any help is very much appreciated.
    Thanks!
    Attached Files Attached Files
    Last edited by yunesm; 04-21-2011 at 01:58 PM. Reason: Solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Reformat data to remove blanks

    You could use a Helper Column, for example, column O

    In cell O2, put the formula:

    =COUNTIF(A2:N2,"")

    and drag down to the end of the data

    Now use Autofilter and filter on the value 14 (14 blank cells)

    Delete the rows highlighted

    Turn off the Autofilter

    Delete the Helper Column

    A bit tidier but not exactly what you asked for ;-)

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: Reformat data to remove blanks

    Thanks for the comment TMShucks! No, you're right this is a bit different than what I'm looking for. It's easy to remove the rows that are all blank with VB but what I need is to have all continous cells. Once I delete the all blank rows I'm still left with many blank cells.

    I could do this manually with the amount of data I have now BUT we are surveying ~ 175 more people. I need to clean-up and analyze the final data set and I do not want to have to do that manually.

    Thanks!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Reformat data to remove blanks

    One easy way would be to select each column and sort each one individually.

    Record a macro as you do it ... or at least the first one ... and you have the basis for your code.

    Then delete the rows where the cells are all blanks (as described earlier)

    Regards

  5. #5
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: Reformat data to remove blanks

    That's a really good simple idea...! Thanks

+ 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