A
a
Hello,
I am trying to use Find to find each occurrence of "Total" in a dynamic
range and then to change the font to bold on each of the columns in the
Total row. I don't know how to get this to work more than once. The
following code will work for the first occurrence - but I can't seem to
figure out how to get it to do the same with any other occurrence.
Can anybody help me with this?
As always, any help would be greatly appreciated.
Best Regards,
Anita
Sub ThisWorks()
'this works but it needs a way to search more than once
Dim i As Integer
Columns(3).Select
Selection.Find(What:="Total", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
i = 1
Do Until i = 19
ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate
ActiveCell.Font.Bold = True
i = i + 1
Loop
End Sub
I am trying to use Find to find each occurrence of "Total" in a dynamic
range and then to change the font to bold on each of the columns in the
Total row. I don't know how to get this to work more than once. The
following code will work for the first occurrence - but I can't seem to
figure out how to get it to do the same with any other occurrence.
Can anybody help me with this?
As always, any help would be greatly appreciated.
Best Regards,
Anita
Sub ThisWorks()
'this works but it needs a way to search more than once
Dim i As Integer
Columns(3).Select
Selection.Find(What:="Total", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
i = 1
Do Until i = 19
ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate
ActiveCell.Font.Bold = True
i = i + 1
Loop
End Sub