View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
MyVeryOwnSelf[_2_] MyVeryOwnSelf[_2_] is offline
external usenet poster
 
Posts: 143
Default Sorting blank cells with a formula in them

If "" in a formula doesn't equal a truly blank cell, what does?

A truly blank cell is what you get by selecting the cell and hitting the
Delete key. It is neither text nor numeric nor logical.

By contrast, "" is a text string of zero length, one character shorter than
"b".

Just as "b" sorts before "ba", so does "" sort before "a"; just remove the
initial "b" from each to see why.

To see the difference a bit better, put this formula in B1:
=IF(ISTEXT(A1),"T","")&
IF(ISNUMBER(A1),"N","")&
IF(ISLOGICAL(A1),"L","")&
IF(ISBLANK(A1),"B","")&
IF(ISNONTEXT(A1)," ~T","")
and put different kinds of things in A1.

I haven't found any way in Excel for a formula to result in a truly blank
cell.


When I try to sort this new sheet, all the blank rows / cells come
up first ... Is there a way around this?


Maybe by using "ZZZZZZ" instead of "", and (if necessary) finding a way to
hide the Z's.