View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
duane[_61_] duane[_61_] is offline
external usenet poster
 
Posts: 1
Default Polish my code, please


I'm sure there are better ways to do it, but this seemed to work.

Note I limited it to rows 1:100 in column C

Sub macro1()
Dim rng As Range
For i = 1 To 100
Set rng = Cells(i, 3).Find("review")
If rng Is Nothing Then GoTo trynext
myrow = rng.Row
GoTo setcolor
trynext:
Set rng = Cells(i, 3).Find("consent order")
If rng Is Nothing Then GoTo trynext1
myrow = rng.Row
GoTo setcolor
trynext1:
Set rng = Cells(i, 3).Find("closed")
If rng Is Nothing Then GoTo nextrow
myrow = rng.Row
setcolor:
Rows(myrow).Select
Selection.Font.Color = vbRed
nextrow:
Next i
End Sub


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=507521