Function BoldManyByMatch(strFind As String, OExcel As Excel.Application) As Boolean
Dim cellRow As Integer
With OExcel
cellRow = .ActiveCell.Row
.Cells.Find(What:=strFind, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate
Do While cellRow < .ActiveCell.Row
.Range(Selection, Selection.End(xlToRight)).Select
.Selection.Font.FontStyle = "Bold"
.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
.Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
cellRow = .ActiveCell.Row
.Cells.Find(What:=strFind, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate
Debug.Print .ActiveCell.Row
Loop
End With
BoldManyByMatch = True
Exit Function
End Function