Can Some one help me here. What I want to be able to do is sort the sheet in time order, So that if a name is added to the bottom of the sheet with a different time than the last entry it will sort it into order.
I have tried 2 codes with varying results on each
The first code selects all the ones with data in them but col d is left blank so it will only select a:c and my times i need sorting are in f.
[vb]
Range("a9").Select
ActiveCell.CurrentRegion.Select
Selection.Sort Key1:=Range("f9"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
[/vb]
the next one i tried works partly but i have data at offset below the main list that it also moves, I also need it to be able to Keep any information that is on the same row together once it has been sorted.
If I change the second sort range to g9 it works OK but it leaves any information the is associated to the rows where it is
[vb]
Range(Range("a9"), Range("t9").End(xlDown)).Sort Key1:=Range("F9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
[/vb]
TIA
Ian
I have tried 2 codes with varying results on each
The first code selects all the ones with data in them but col d is left blank so it will only select a:c and my times i need sorting are in f.
[vb]
Range("a9").Select
ActiveCell.CurrentRegion.Select
Selection.Sort Key1:=Range("f9"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
[/vb]
the next one i tried works partly but i have data at offset below the main list that it also moves, I also need it to be able to Keep any information that is on the same row together once it has been sorted.
If I change the second sort range to g9 it works OK but it leaves any information the is associated to the rows where it is
[vb]
Range(Range("a9"), Range("t9").End(xlDown)).Sort Key1:=Range("F9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
[/vb]
TIA
Ian