Hello,
I am needing help to find a macro that can: find a specific text - for ex: "Schedule (below)" in cell C100 - and after it is found, the code would skip the next row below, then sort
all rows by date from oldest to newest.
eg:
A B C
100 Schedule (below)
101 Due WO# Name
102 11/20 0395625 B.G
103 11/18 0385612 C.F
104 11/05 0396452 B.O.G
to
A B C
100 Schedule (below)
101 Due WO# Name
102 11/05 0396452 B.O.G
103 11/18 0385612 C.F
104 11/20 0395625 B.G
I've recorded a macro, but I don't know how to make it works if other users have input or added extra rows above the "Schedule (below)" row.
Please help.
My recorded code for my actual worksheet:
Sub Macro1()
Range("A1588").Select
ActiveWindow.SmallScroll Down:=543
Range("A1588:J2139").Select
ActiveWorkbook.Worksheets("vinyl").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("vinyl").Sort.SortFields.Add Key:=Range( _
"A1588:A2139"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("vinyl").Sort.SortFields.Add Key:=Range( _
"C1588:C2139"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("vinyl").Sort.SortFields.Add Key:=Range( _
"B1588:B2139"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("vinyl").Sort
.SetRange Range("A1588:J2139")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWindow.SmallScroll Down:=-309
End Sub
Thanks very much in advance
Tom
Bookmarks