Hi
Am trying to make all subtotal lines bold (ie the numbers themselves). Problem is that VBA is on Sheet1 and formatted data is on Sheet2. How do I make the ranges in the code below refer to the second sheet (without the ws references, the code reads data form the first sheet. With them I get a 400 error)?
TIA
Am trying to make all subtotal lines bold (ie the numbers themselves). Problem is that VBA is on Sheet1 and formatted data is on Sheet2. How do I make the ranges in the code below refer to the second sheet (without the ws references, the code reads data form the first sheet. With them I get a 400 error)?
TIA
Code:
' Make the subtotal lines bold on the ReportData worksheet
Set ws = Sheets("ReportData")
For Each c In ws.Range([A1], [A65536].End(xlUp))
If Right(c, 5) = "Total" Then
ws.Range(c, c.End(xlToRight)).Font.Bold = True
End If
Next c