PDA

View Full Version : Sort Question



gimli
05-20-2010, 08:30 AM
Hey all,

Im sorting some data descending like


Sub Ten()
Application.ScreenUpdating = False
Range("Q5:W22").Sort key1:=Range("T5:T22"), order1:=xlDescending, Header:=xlNo
End Sub



Problem is that some cells in range T5:T22 are not numbers. I am putting a "" value in to remove REF errors if they exist. So the sort is putting those cells at the top..then the numbers decending...

anyways around that? I would like those cells to be put at the bottom of the list..not the top.

thanks much

lynnnow
05-20-2010, 08:56 AM
Did you try this?

Range("Q5:W22").Sort Key1:=Range("T5"), order1:=xlDescending, Header:=xlNo

HTH

gimli
05-20-2010, 09:53 AM
Tried that but it doent change anything..

I guess I could change the "" to 0 and just hide the value 0 with conditional formatting

hrmm