Morning all,
I've tweaked some existing code I have but I'm encountering an error message when I run it. I'm trying to apply a conditional format to a range (starting in cell AO2 and covering the range below and to the right of it). Below is the code I am using and the issue appears to arise around the line highlighted in red.
Range("AO2").Select
Range(Selection, Selection.End(xlDown).End(xlToRight)).Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=cells(2,41).address(false, false)=TRUE"
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.799981688894314
End With
Thanks in advance,
Snook
Bookmarks