Sort Contents of Moving Range
Range("B10").CurrentRegion
Change B10 to the top left corner of your data.
To test it do
Range("B10").CurrentRegion.Select
does that get what you want?
If you want to include headers and there is a blank row below the header
(headers in row 1).
set rng = Range(Range("A1"), Range("A3").CurrentRegion")
rng.Select
--
Regards,
Tom Ogilvy
wrote in message
oups.com...
I haven't been able to pull different topics together to find a
concrete answer for this. I have a project list i am making, and i have
a macro to insert a line underneath the header(which is a range), so
users basically just keep inserting rows on and on. The sheet allows
for 2 different "sort criteria". I have the sort macro in place, and
currently have users highlighting the content and hitting the button to
sort their entries. What i would like to do is have excel go from the
header range, look down until it finds and empty cell, then look right
until it finds an empty cell, and automatically select the cells with
contents so that then it can sort itself with one click and no need to
highlight. I know this is possible i just don;t know how to incorporate
excels look for blank logic. Thanks for any help.
|