Im using:
Range(Cells(Range("b:b").find("e0").Row, 1), _
Cells(Range("b:b").find("e1").Row - 1, 1)).Columns("A:z").Select
to select all the rows containing 'EO' then sorting the data with
Selection.Sort Key1:=Range("K3"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
This all works great if the data is at the beginning of the worksheet,
the problem I have is that I also use the above to select any row with
'e2' in, not a problem selecting just sorting, because the range for
sort can vary from k20 to k30, is the a simple way that when ive
selected the data I can tell what Range the first row starts at. eg if
I could tell it started at A25 I could the trim and put K25 into sort
range. The data to sort is always in the k column, and never mixed up.
Regards Robert
Bookmarks