Hello:
Please refer to attached file.
I am using below VB Code to sort the list in Ascending order instantly once the Name is added in column B.
Dim LastRow As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
LastRow = Range("A" & Rows.Count).End(xlUp).Row
'MsgBox "LastRow" & LastRow
Range("A1:A" & LastRow).Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End Sub
I am getting error.
Would appreciate help to correct the code.
Let me know if you have any questions.
Thanks.
Riz
Bookmarks