Sorting blank cells


Posted by Duane Kennerson on November 17, 2000 4:54 PM

I have a worksheet that contains linked cells to 50 other
worksheets within the workbook. Column A of the worksheet
contains the names of people. If a name is not present
on the worksheet that the cell is linked to , it will
create a blank cell. So I might have a couple of cells in
column A with names, then a couple of blank cells and
then some more names.
The problem is, is when I want to
sort the names alphabetically, the blank cells come first
when the sort is done. I want the blank cells to be last
when I sort.I want to do the sort programatically so the
the user just pushes a button to do the
sor. Can anyone help me...?

Posted by Ben O. on November 17, 2000 5:17 PM

You could always have the macro turn on the autofilter and filter out the blank cells. Otherwise you could create a hidden column next to column A containing a formula like, =IF(A2="","zzzzzzz",A2), and then sort that column rather than column A. The cells adjacent to blank cells in A will be "zzzzzzz" and therefore will be moved to the bottem when the list is sorted. Not the ideal solution, but I think it would work.

-Ben



Posted by Duane Kennerson on November 17, 2000 8:19 PM

Excellent Ben, thanks for the help.