Codeblue
06-28-2012, 09:07 AM
Hello
This code works pretty well but there are two things I'd hope to fix...
Range("A2:F19").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD( ROW( ), 2) =0"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriori ty
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.799981688894314
End With
Selection.FormatConditions(1).StopIfTrue = True
the first thing is it highlights the selection because of this bit
Range("A2:F19").Select
but it doesn't work without it.
The 2nd item may fix the first and that is I would rather it be dynamic for the number of rows to color. The number of rows will change daily and want it to color where there is data.
This code works pretty well but there are two things I'd hope to fix...
Range("A2:F19").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD( ROW( ), 2) =0"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriori ty
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.799981688894314
End With
Selection.FormatConditions(1).StopIfTrue = True
the first thing is it highlights the selection because of this bit
Range("A2:F19").Select
but it doesn't work without it.
The 2nd item may fix the first and that is I would rather it be dynamic for the number of rows to color. The number of rows will change daily and want it to color where there is data.