I am sorting a worksheet and finding that I am getting confusing (to me) results with respect to the treatment of blanks. In one workbook, an ascending order sort puts rows with blanks first and in another workbook, it puts them last. ( Both in an ascending sort) .
I have checked for leading blank characters that might be confusing things in the non-blank cells and find none. (Used Left( A1, 1) to have Excel tell me what the first character is. It is the character I see visibly. Eg if A1 contains "Dog" it returns "D".)
I have used IF (A1="",true ,false) to verify that the visibly blank cells are indeed blank.
I am doing the sort in a macro (recorded by excel), but get the same result when I do the sort directgly through the user interface.
The help text says that blanks always sort to the end, I am seeing blanks at the end when I sort descending but as stated above, in one case it is putting the blank rows first.
(The exact data in the two workbooks is not the same.)
Can anyone suggest what might be causing the blanks to sort first?
If requested I can supply the worksheet with sample data.
Bookmarks