FormatCondition.Formula1 Property (Excel)

Returns the value or expression associated with the conditional format or data validation. Can be a constant value, a string value, a cell reference, or a formula. Read-only String .


expression. Formula1

expression A variable that represents a FormatCondition object.


This example changes the formula for conditional format one for cells E1:E10 if the formula specifies "less than 5."

With Worksheets(1).Range("e1:e10").FormatConditions(1) 
 If .Operator = xlLess And .Formula1 = "5" Then 
 .Modify xlCellValue, xlLess, "10" 
 End If 
End With

See also

FormatCondition Object