View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
CB CB is offline
external usenet poster
 
Posts: 60
Default Fill Cells with Red

Thanks Gary. This is just what I needed.

"Gary''s Student" wrote:

Sub cb()
n = Cells(Rows.Count, "F").End(xlUp).Row
For i = 1 To n
If Cells(i, "F").Value = "red" Then
Range("A" & i & ":E" & i).Interior.ColorIndex = 3
Range("G" & i & ":M" & i).Interior.ColorIndex = 3
End If
Next
End Sub
--
Gary''s Student
gsnu200708


"CB" wrote:

I have a spreadsheet that I need to fill the interior color of the row red if
column f contains the text red. I need the data in each row to turn red if f
is red for columns a through e and g through m.
Is there an easy way to do this other than sorting/filtering. I have
already used the conditional formatting option for another purpose. Is there
some
way to do this with VBA?

Any help is appreciated.