Change entire row color

  • Thread starter Thread starter mthomas
  • Start date Start date
M

mthomas

I know how to iterate down the rows, but how do I assign an entire row
font color. To assign red or blue, would it be something like:

if cells(i,1).Value = "Non-Interum Servicing" then
Worksheet.Range.EntireRow.Font.Color = RGB(255, 0, 0)
else
if cells(i,1).Value = "Interum Servicing" then
Worksheet.Range.EntireRow.Font.Color = RGB(0, 0, 255)
end if
end if


Thanks in advance everyone
 
Hi M,

Try something like:

Sub AAA()

Dim i As Long

For i = 1 To 10
With Cells(i, 1)
If .Value = "Non-Interum Servicing" Then
.EntireRow.Font.Color = RGB(255, 0, 0)
ElseIf .Value = "Interum Servicing" Then
.EntireRow.Font.Color = RGB(0, 0, 255)
End If
End With
Next i
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

Back
Top