View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default changing font colour

One way:-

Sub stantial()
Dim myRange As Range
Set myRange = Range("H1:H200")
For Each c In myRange
c.Select
If c.Value = "PRO" Then
Selection.EntireRow.Select
Selection.Font.ColorIndex = 3
End If
Next
End Sub

Mike

"Jock" wrote:

Using vba, how can I change font colour to red for the entire row (A5 - Z5)
if cell H5 contains "PRO"? And how do I then copy this code so it affects all
rows (up to 200) in the worksheet?
--
tia

Jock