Hi Tony,
The code stops if you add more data. Think it's because of the double bold cells Joe Smith Total and Tim Jenkins
I've add a line which seems to handle that.
PS Nice work
Public Sub SortBold()
Dim myR As Range
Dim LastR
Dim startRow
Dim endRow
Dim i
LastR = Cells(Rows.Count, 1).End(xlUp).Row
startRow = 1
For i = 2 To LastR
If Cells(i, 1).Font.Bold = True And Cells(i + 1, 1).Font.Bold = False Then 'Bold
If startRow = 0 Then
startRow = i
Else
endRow = i
Set myR = Range(Cells(startRow + 1, 1), Cells(endRow - 1, 2))
myR.Sort key1:=Range("B:B"), header:=xlNo
startRow = 0
endRow = 0
End If
End If
Next
End Sub
VBA Noob
Bookmarks