selection.find question (bet it's an easy one)

Joined
Jun 13, 2007
Messages
1
Reaction score
0
Greetings all! I am trying to tweak a spreadsheet macro that I made and am having a little trouble. The macro looks at a list, takes the first name, goes to the first range, finds the name, and highlites it in red (then proceeds to columns 2 & 3 and does the same thing). The issue that I am having is that the names on the list are not always in the columns. I am looking for the command that will allow the macro to continue on if it does not find the name it is looking for. Any help? I have included a copy of the macro below for reference.

Thanks!
AJ

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/10/2007 by AJ
'
Application.ScreenUpdating = False
Cells.Find("Top Twelve").Select
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value > "" Then
Do
Driver = ActiveCell.Value
Range("B:B").Activate
Selection.Find(what:=Driver, LookAt:=xlPart, After:=ActiveCell).Select
Selection.Font.ColorIndex = 3
Range("D:D").Activate
Selection.Find(what:=Driver, LookAt:=xlPart, After:=ActiveCell).Select
Selection.Font.ColorIndex = 3
Range("F:F").Activate
Selection.Find(what:=Driver, LookAt:=xlPart, After:=ActiveCell).Select
Selection.Font.ColorIndex = 3
Range("H:H").Activate
Selection.Find(what:=Driver, LookAt:=xlPart, After:=ActiveCell).Select
Selection.Font.ColorIndex = 3
Range("K:K").Activate
Selection.Find(what:=Driver, LookAt:=xlPart, After:=ActiveCell).Select
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell)
End If
Application.ScreenUpdating = True
'
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top