Hello,
I need to sort a text column and ignore (or put at the end of the sorted column) all blank cells. I've been using this formula to sort so far (entered with Ctrl-Shift-Enter as an array formula):
=IF(ROWS($B$1:B1)<=COUNTA(NAMES);
INDEX(NAMES;MATCH( SMALL(COUNTIF(NAMES;"<"&NAMES);ROWS($B$1:B1)); COUNTIF(NAMES;"<"&NAMES); 0));
"")
(Please note I'm using semicolons instead of commas)
The above formula would sort a named range called NAMES in column A like this in column B:
But there's a problem if the named range has blank cells in the end, then the first name is repeated in the sorted column as many times as the blank cells, at the expense of the last ones that disappear, like this
How can I achieve the desired result which is the following ?
Thank you in advance!
Bookmarks