Thank you for looking at my question,
I want to format a range of cells on a worksheet using VBA (Excel 2013):
.Range("A3:U" & lngBOMRows).Select
With Columns("A:U").FormatConditions.Add(Type:=xlExpression, Formula1:="=IF(Q1>U1)")
.Interior.PatternColorIndex = xlAutomatic
.Interior.Color = 15773696
.StopIfTrue = True
For the range A3: last cell in U, if the value in Q is greater than U
but I get a runtime error and invalid procedure call message.
This also happened when I tried to set the font of a range of cells.
I looked in the References, there aren't any there flagged as missing, presumably there is one that hasn't been ticked but I don't know which it is can you help?