Hi Emily,
Try this macro out on a copy of your worksheet. It worked on the
example data you supplied.
It converts found names to bold.
Public Sub HighlightNames()
Application.ScreenUpdating = False
Dim lnLAtRowA As Long
Dim lnLastRowB As Long
Dim I As Long
Dim J As Long
lnlastrowA = _
ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
lnLastRowB = _
ActiveSheet.Range("B" & Rows.Count).End(xlUp).Row
For I = 1 To lnlastrowA
If Cells(I, 1) = "" Then GoTo BLANKA
For J = 1 To lnLastRowB
If Cells(J, 2) = "" Then GoTo BLANKB
On Error Resume Next
If Not (WorksheetFunction.IsError _
(WorksheetFunction.Find _
(Cells(I, 1).Value, Cells(J, 2)))) Then
Cells(J, 2).Characters _
(WorksheetFunction.Find _
(Cells(I, 1).Value, Cells(J, 2)), _
Len(Cells(I, 1).Value)).Font.Bold = True
End If
BLANKB: Next J
BLANKA: Next I
End Sub
Ken Johnson
|