Here is a method to sort the data by last name simply double clicking any cell in the Name column.
Copy this event handler to the clipboard (highlight the entire event handler, right click inside the highlighted area, and 'Copy'):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim i, LastRow
LastRow = Cells. SpecialCells(xlCellTypeLastCell).Row
tCol = Split(Cells(1, Target.Column).Address, "$")(1)
On Error GoTo errhandler
For i = 1 To LastRow
Cells(i, "IV").Value = Right(Cells(i, Target.Column), _
Len(Cells(i, Target.Column)) - _
Application.Find(" ", Cells(i, Target.Column)))
Next
Range(tCol & "1:IV" & LastRow).Select
Selection.Sort Key1:=Range("IV1"), Order1:=xlAscending, _
Header:=xlGuess
Range("IV:IV").ClearContents
errhandler:
Target.Offset(1).Select
End Sub
Select the worksheet containing the data to sort and right click the sheet tab at the bottom.
Select 'View Code'.
Paste the event handler into the white editing area to the right (right click inside the area and 'Paste').
Close the VBE (red button - top right).
Double click any 'Name' cell to sort the data by Last Name.
Note: this example assumes that your data columns may include column A through column IU. Thus, columns A:IU will be sorted based on the Last Name in the Name column.
Edit: this example assumes your data begins in row 1. If you have column headers, i.e. 'Name', in the first row, change this line before copying the event handler:
For i = 1 To LastRow
to
For i = 2 To LastRow