View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Black Paul Black is offline
external usenet poster
 
Posts: 394
Default Sort Without Knowing Last Cell

Hi everyone,

I have a program that outputs columns of values to a worksheet.
I have titles in row 2 and the values start in columns "E3:G?",
"I3:L?" etc.
I would like to sort the values but I don't know what the last row
will be.
Here is an example for columns "E3:G?" ...

Range("E3:G?").Select
Selection.Sort Key1:=Range("G3"), Order1:=xlDescending,
Key2:=Range("E3") _
, Order2:=xlAscending, Key3:=Range("F3"), Order3:=xlAscending

.... with the ? is the unknown number to sort down to.

Thanks in Advance.
All the Best.
Paul