Conditional Formatting command translated into VB

J

jaggy

I have a worksheet were I need to color a row based on two criteria -
(1) if the value in cell E6 is "No" and cell C6 is blank, I would like
to color the entire row green. I need to do this for an entire
worksheet and I would like to do this in VB. Is this possible?

Any help would be greatly appreciated,
Jaggy
 
N

Naveen

Try this ...

===============================================
Sub Naveen2()
For Counter = 1 To ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
If Cells(Counter, 3) = "No" And Cells(Counter, 5) = "" Then
With Rows(Counter).Interior
.ColorIndex = 50
.Pattern = xlSolid
End With
End If
Next Counter
End Sub
===============================================

*** Please do rate ***
 
Top