+ Reply to Thread
Results 1 to 10 of 10

Moving rows that contain blank cells to the bottom

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Moving rows that contain blank cells to the bottom

    Good morning,

    I am wondering if someone can help me with the following problem. I have been searching for a while but I am not too familiar with excel programming.

    I need to sort a spreadsheet by name, then by date, and then move all rows that contain text in column (M2:*) to the top that way all blanks are at the bottom.

    Does anyone know an easy way to do this? Please let me know if you have any questions. Thank you in advance.

    Best regards,

    Yamil Font

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Moving rows that contain blank cells to the bottom

    Hi Yamil and welcome to the forum,
    You can accomplish this by using a built in Sort Function in Excel.

    Here are some links to discribe what to do.
    http://www.homeandlearn.co.uk/excel2...l2007s3p1.html
    http://www.uwec.edu/Help/Excel07/srtcom.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-14-2011
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Moving rows that contain blank cells to the bottom

    Quote Originally Posted by MarvinP View Post
    Hi Yamil and welcome to the forum,
    You can accomplish this by using a built in Sort Function in Excel.

    Here are some links to discribe what to do.
    http://www.homeandlearn.co.uk/excel2...l2007s3p1.html
    http://www.uwec.edu/Help/Excel07/srtcom.htm
    Hi Marvin and Thanks for your reply!

    I already know how to sort but the problem is that my very first sort should be to move all rows that contain text from a cell to the top and the blanks to the bottom (without sorting it by A to Z). Does that make sense?

    Best regards,

    Yamil Font

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Moving rows that contain blank cells to the bottom

    If you sort your whole table from A to Z it will put blanks on the bottom. Use the Sort Icon as I find that easier. You also have to select the whole table before doing the sort. I hope you don't have blank rows or columns in your table. If you do then be SURE to select the whole table before using the Icon to Sort.

  5. #5
    Registered User
    Join Date
    06-14-2011
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Moving rows that contain blank cells to the bottom

    Quote Originally Posted by MarvinP View Post
    If you sort your whole table from A to Z it will put blanks on the bottom. Use the Sort Icon as I find that easier. You also have to select the whole table before doing the sort. I hope you don't have blank rows or columns in your table. If you do then be SURE to select the whole table before using the Icon to Sort.
    Thanks again Marvin I really appreciate your prompt responses!

    Let me rephrase what I am trying to do.

    I have a table that has name, date, and comments. I want to sort the table by Name first, then by date. Then, I want to only display the rows that contain text in COMMENTS at the top and leave the blanks at the bottom. I don't think there is a way to do this with sort...or is there?

    Best regards,

    Yamil Font

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Moving rows that contain blank cells to the bottom

    Hey Yami,

    YES that is exactly what it shows in http://www.homeandlearn.co.uk/excel2...l2007s3p1.html -
    You are looking for the "Add a Level".
    Try sorting first by Comment, then by name and last by date. All those comments that are blank should go to the bottom

  7. #7
    Registered User
    Join Date
    06-14-2011
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Moving rows that contain blank cells to the bottom

    Quote Originally Posted by MarvinP View Post
    Hey Yami,

    YES that is exactly what it shows in http://www.homeandlearn.co.uk/excel2...l2007s3p1.html -
    You are looking for the "Add a Level".
    Try sorting first by Comment, then by name and last by date. All those comments that are blank should go to the bottom
    Hi Marvin,

    I understand what you are saying. When I sort it by comments first, it sorts it from A-Z which results in Blanks going to the bottom. However, I don't want comments sorted A-Z. I want to bring the blanks to the bottom without having it sort A-Z. Does that make sense?

    Best regards,

    Yamil Font

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Moving rows that contain blank cells to the bottom

    Do an AutoFilter instead of a sort for your comments column.
    See http://www.contextures.com/xlautofilter01.html

  9. #9
    Registered User
    Join Date
    06-14-2011
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Moving rows that contain blank cells to the bottom

    Quote Originally Posted by MarvinP View Post
    Do an AutoFilter instead of a sort for your comments column.
    See http://www.contextures.com/xlautofilter01.html
    This was also a solution...however, the user did not want to have the rows disappear. When I use filter, the rows that are blank disappear.

    I tried to add the filter, do the sorting, and then clear the filter but everything goes back to the way it was.

    Best regards,

    Yamil Font

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Moving rows that contain blank cells to the bottom

    If you copy and paste a autofiltered range to a new sheet they might like it.??

+ 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