Sorting Question

  • Thread starter Thread starter runningdog
  • Start date Start date
R

runningdog

Hi.

When I sort a selection by a column that contains blanks the rows with
blanks always sort to the end regardless whether I set ascending or
descending. Is there anyway to reverse this?

Selection.Sort Key1:=Range("B11"), Order1:=xlAscending, Key2:=Range("M11"
_
), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=
_
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortTextAsNumbers

Column B contains a either 'X' or ''
Column M contains a number

and I want the rows with an 'X' at the bottom of the list.

TIA Steve

PS Using Office 2003 pro
 
Maybe you could put something in those blank cells, then sort, then remove the
blanks.

Record a macro when you do your Edit|replaces and you can add them before and
after your sort.

(Use a unique value--so you don't change real data!)

Alternatively, you could sort, then move those rows to where you want them.
 
You could use a helper column, insert this formula and copy down

="aaaa"&A1

then highlight both columns and sort on the helper column

Vaya con Dios,
Chuck, CABGx3
 
Back
Top