View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bony_tony bony_tony is offline
external usenet poster
 
Posts: 76
Default Sort data whilst autofiler is on

Hi,
I would like to sort all of my data whilst the autofiler is on. I
currently have to clear the autofilter to select all the data, as...

Range("A5:P" & Cells(Rows.Count, "A").End(xlUp).Row).Select
Selection.Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

will only go down to the last row the autofilter is displaying. (ie.
say if row 10 is the last row in my table, and is filtered out, the
selection will only go down to row 9)

Any ideas how to select all of my table whilst the autofiler is on??

Thanks