This seems to work in my test WB
Sub test()
With Sheets("Sheet1").Range("$O$2:$O$500")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(E2<>"""", A2<>4,A2<>5,A2<>6,A2<>7,$O2<TODAY()+29)"
With .FormatConditions(.FormatConditions.Count)
.SetFirstPriority
.Font.Bold = False
.Font.Italic = True
.Font.Color = vbRed
.Interior.Color = vbYellow
.StopIfTrue = False
End With
End With
End Sub
I didn't notice it before but I think the parens after .Add and after 29)" were the issue
With .FormatConditions.Add Type:=xlExpression, Formula1:="=(AND(E2<>"",A2<>4,A2<>5,A2<>6,A2<>7,$O2<TODAY()+29)"