+ Reply to Thread
Results 1 to 3 of 3

Is there a sort order that puts blank cells at the top?

Hybrid View

calvin-c Is there a sort order that... 12-01-2016, 02:35 PM
shg Re: Is there a sort order... 12-01-2016, 02:38 PM
newdoverman Re: Is there a sort order... 12-01-2016, 02:53 PM
  1. #1
    Registered User
    Join Date
    07-04-2012
    Location
    Washington State
    MS-Off Ver
    Excel 2007
    Posts
    11

    Is there a sort order that puts blank cells at the top?

    One of the columns I sort by contains alphabetic data-when it contains any data at all. I'd like the sort to highlight the rows without data in that column by putting them at the top-but it doesn't seem to matter how I sort that column, rows without any data fall at the bottom. Is there a way to fix this? Thanks.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Is there a sort order that puts blank cells at the top?

    You could use another column with a formula that tests for blanks in the column of interest, and sort by that first.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Is there a sort order that puts blank cells at the top?

    You don't say how you are sorting. If you are using Editing, Sort and Filter all the blanks will go to the bottom. The same is true if you use the Filter that is on the Data tab. You can however use the filter to only display the blank cells by deselecting Select All and then select at the bottom of the list "Blanks." You can then do whatever you want to do with these blanks.

    If you want the list to be presented in full with the blanks at the top and the rest sorted in order use a helper column (I entered data in Column A with a header and used column B as the helper).
    Enter this in B2 and fill down
    Formula: copy to clipboard
    =COUNTIF($A$2:$A$20,"<="&A2)

    Now, select the original data with the headers and click on the Data tab and then click on the Filter button.
    Click the filter on column B and sort from Smallest to Largest. All the blanks will be at the top and the rest will be in alphabetic order.

    If you don't need the rest to be in order enter this in the helper column and fill down to identify the blanks as SHG has suggested. Sort smallest to largest and the blanks will be at the top and the rest will be in the original order.
    Formula: copy to clipboard
    =IF(A2="",1,"")
    Attached Files Attached Files
    Last edited by newdoverman; 12-01-2016 at 02:58 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. When I CopyFromRecordset a MYSQL CONCAT statement, it puts 256 blank rows into Excel table
    By Coastal_view in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2015, 09:28 AM
  2. Replies: 1
    Last Post: 01-29-2014, 12:57 AM
  3. Replies: 1
    Last Post: 11-03-2013, 06:18 PM
  4. [SOLVED] Sort by descending order, but the blank spaces come on top
    By billj in forum Excel General
    Replies: 3
    Last Post: 07-18-2013, 04:18 PM
  5. Replies: 1
    Last Post: 05-15-2013, 06:55 AM
  6. sort top five cells in order from other sheet
    By lostinexcel9 in forum Excel General
    Replies: 1
    Last Post: 11-02-2010, 11:05 PM
  7. [SOLVED] IN EXCEL I HAVE A LIST I TRY SORT ASENDING BUT IT PUTS TRUE AFTER.
    By DISCO DAVE in forum Excel General
    Replies: 2
    Last Post: 04-15-2005, 02:06 PM

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