Help needed to sort Variable Range

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

picklepuss

Thread Starter
Joined
Mar 25, 2010
Messages
8
I need some help to sort data in a range that has a variable start row. There is other, seperated and seperately sorted data above it, so the range would be

Range(A[variable row]:H1000).Sort Key1:=Range([sorting by the value in column A of the range])

What is the correct syntax to do this? Also what is the best way to define the variable row earlier when the ActiveCell is on it?

Any help would be very much appreciated.
:confused:
 
Joined
Sep 4, 2003
Messages
4,916
Try this

vStartAddress = ActiveCell.Address

Range(vStartAddress & ":H1000").Sort Key1:= Range(vStartAddress), Order1:=xlAscending


Regards,
Rollin
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top