This code sorts my page from A4:AI38. My line or row numbers are in col B and are also sorted out of order. What I want to do is sort Col B from B4 to FinalRow or to use autofill to just fill in the numbers or any solution which will leave column B numbered from 1 to FinalRow - 3.
This is my code:
Sub Sort()
'
' Sort Macro
ActiveSheet.Unprotect
Dim FinalRow
FinalRow = Range("A65536").End(xlUp).Row
'Sort Location Names
Range(Cells(4, 1), Cells(FinalRow - 3, 35)).Select
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'It works down to here============================
'Sort Row Numbers in col B
Range(Cells(4, 2), Cells(FinalRow - 3, 2)).Select
On Error Resume Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub