Thread: Is there away?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Michael Koerner Michael Koerner is offline
external usenet poster
 
Posts: 164
Default Is there away?

Thanks, will try it out.

--

Regards
Michael Koerner


"Per Jessen" wrote in message ...
Hi

Set SortRange=Range("A1" ,Range("G" & Rows.Count).end(xlup))
SortRange.Sort Key1:=Range("E2")

Hopes this helps.

Per


"Michael Koerner" skrev i meddelelsen
...
I have a macro with the following line:

Range("A1:G1024").Sort Key1:=Range("E2"),

Is there a way to code it so that whenever I add a new item I don't have to
continually edit the macro, and change the end range value to accommodate
the newly inserted item?

--

Regards
Michael Koerner