I am trying to highlight and bold a range of cells that are subtotals. The subtotal row can change depending on data but the column range is A:AM.
I have tried a few different methods to get this working but generally end up with a range failure. Here is what I currently have. THanks in advance for any help.
Sub highlight()
Dim cell As Range
Sheets("Header").Activate
Range(Range("D4"), Range("D4").End(xlDown)).Select
For Each cell In Selection
If cell.Font.Bold = True Then
Range.End(xlToLeft).Select
row.colorindex = 24
Font.Bold = True
End If
Next cell
End Sub
I have tried a few different methods to get this working but generally end up with a range failure. Here is what I currently have. THanks in advance for any help.
Sub highlight()
Dim cell As Range
Sheets("Header").Activate
Range(Range("D4"), Range("D4").End(xlDown)).Select
For Each cell In Selection
If cell.Font.Bold = True Then
Range.End(xlToLeft).Select
row.colorindex = 24
Font.Bold = True
End If
Next cell
End Sub