Maybe...
with activesheet
with .range("f4:G" & .cells(.rows.count,"F").end(xlup).row)
.sort key1:=.columns(1), header:=xlyes
end with
end with
The last cell in the F:G range is based on the bottom most cell in column F.
"Pierre via OfficeKB.com" wrote:
Hi Tom,
As allways : THANKS !!!
but i think i put my question a little wrong...
My data does not start in F1 but in F4.... and the length of the list is
dependent on the users input (can be 20 items, can be 50 items).
How can i adapt your code ?
Pierre
P.S. My data does not start in F1 but in F4.... and the length of the list is
dependent on the users input (can be 20 items, can be 50 items).
Tom Ogilvy wrote:
Range("F:G").sort Key1:=Range("F1"), Header:=xlYes
Hi,
How can i, in vba, sort colum F and G on the value in column F.
Thanks,
Pierre
--
Message posted via http://www.officekb.com
--
Dave Peterson