Including a variable into formatconditions
I am trying to convert the cell reference in the formula1 from a specific
cell to a program selected cell;
B391 to cells(rowindex,columnindex)
(actual code)
Range("B996:Y998").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression,
Formula1:="=AND(B391=1)"
everything I try turns into an error
Selection.FormatConditions(1).Interior.Pattern = xlGrid
|