+ Reply to Thread
Results 1 to 5 of 5

Sorting is putting blank cells at top?

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    25

    Sorting is putting blank cells at top?

    Hey guys.

    I am trying to use the sort function, and for some reason it has started putting the blank cells above the rest.
    i.e. A2:A102 contains around 90 cells which are fill with numbers 10-60. When I sort them Largest to Smallest, the top 10 cells are always coming up with the blank cells.

    My understanding of the sort function is that blanks are always supposed to come last. Am I wrong?
    I have also tried using the IF formula (they are fed by formulas) to make any blank cells into a space instead. But this is not working either.

    Any suggestions?

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    883

    Re: Sorting is putting blank cells at top?

    Are your cells truly blank or are they nullstrings as the result of formula?
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Sorting is putting blank cells at top?

    There are two column doing it.
    One is fed by formulas
    The other is not.
    Last edited by brendan2711; 07-15-2013 at 10:56 PM.

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    883

    Re: Sorting is putting blank cells at top?

    The easiest way around the formula column (if it is nullstrings) returned is to use a helper column and instead of using "" use a number you know will be lower than any number in the data i.e. something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    then sorting on that column.
    You can then either hide or delete the helper column,

    The cells that are not from formula are a bit more puzzling unless the data is imported from the web or from a CSV file. Do a test on to find out what they are.

    Try something like CODE(B1) to see if there is a non-printing character and obviously do a nullstring test as per the formula for the helper column.

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Sorting is putting blank cells at top?

    Looks Like I got it working. Thanks for the help.

+ 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. Basic sorting with blank cells
    By KTed in forum Excel General
    Replies: 4
    Last Post: 09-04-2012, 04:43 PM
  2. Sorting data excluding blank cells
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2008, 11:09 AM
  3. Sorting with Blank Cells
    By excelentuser in forum Excel General
    Replies: 1
    Last Post: 10-25-2007, 10:41 PM
  4. [SOLVED] sorting w/ blank cells
    By mark kubicki in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2006, 02:20 AM
  5. Blank Cells when Sorting
    By Xiazer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2006, 10:05 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