FormatCondition.Formula2 property (Excel)
Returns the value or expression associated with the second part of a conditional format or data validation. Used only when the data validation conditional format Operator property is xlBetween or xlNotBetween. Can be a constant value, a string value, a cell reference, or a formula. Read-only String.
Syntax
expression.Formula2
expression A variable that represents a FormatCondition object.
Example
This example changes the formula for conditional format one for cells E1:E10 if the formula specifies between 5 and 10.
With Worksheets(1).Range("e1:e10").FormatConditions(1)
If .Operator = xlBetween And _
.Formula1 = "5" And _
.Formula2 = "10" Then
.Modify xlCellValue, xlLess, "10"
End If
End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.