Good morning. I need the following to fill right to the last populated cell in Row 1.
The range is correct working off E2, but my issue is that the conditional formatting stops at the last full populated column. In this case it is column P. Columns O and beyond are not completely populated.
'fill rows with color based off alternating order numbers
Range("a2", Range("a2").End(xlDown).End(xlToRight)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(SUMPRODUCT(--($e$2:$e2<>$e$1:$e1)),2)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.14996795556505
End With
The range is correct working off E2, but my issue is that the conditional formatting stops at the last full populated column. In this case it is column P. Columns O and beyond are not completely populated.
'fill rows with color based off alternating order numbers
Range("a2", Range("a2").End(xlDown).End(xlToRight)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(SUMPRODUCT(--($e$2:$e2<>$e$1:$e1)),2)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.14996795556505
End With