View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bentod bentod is offline
external usenet poster
 
Posts: 5
Default Help with the following code...from EntireRow to set width

I have this code to format the entire row a certain color depending on
the text in Column "I". However, I really just want it to go from
column "A" to column "J".

What would I substitute for ".EntireRow"?

'------------------------------------------
Sub ConditionalFormatter()

[I2].Activate
With Range([I2], [I65536].End(xlUp)).EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=
$I2=""N"""
.FormatConditions(1).Interior.ColorIndex = 10
.FormatConditions(1).Font.ColorIndex = 2
.FormatConditions.Add Type:=xlExpression, Formula1:="=
$I2=""X"""
.FormatConditions(2).Interior.ColorIndex = 19
.FormatConditions(2).Font.ColorIndex = 1
End With

End Sub
'------------------------------------------

Thanks, Todd