I have two separate fields of Data in this work book. The top one sorts just fine as the first row of data never moves. However, the second field of data shifts down every time a new entry is made into field 1. the formula I have right now is this:
With Worksheets("Sheet1")
LastRow = Cells(Rows.Count, 8).End(xlUp).Row
Set b = Cells.Find("LCPO RECALL", LookIn:=xlValues, lookat:=xlWhole)
Set a = b.Offset(1, 0)
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("T:T") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("a:T" & LastRow)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
any help would be greatly appreciated.
With Worksheets("Sheet1")
LastRow = Cells(Rows.Count, 8).End(xlUp).Row
Set b = Cells.Find("LCPO RECALL", LookIn:=xlValues, lookat:=xlWhole)
Set a = b.Offset(1, 0)
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("T:T") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("a:T" & LastRow)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
any help would be greatly appreciated.