Resets the current Condition's Comparison type and minimum and maximum formulas. The method takes two formulas, and therefore must take a Comparison that requires two formulas, such as Comparison.CellValueBetween.

 public void ChangeCondition(Comparison comparisonType, System.String formula1, System.String formula2)
Public Sub ChangeCondition(ByVal comparisonType As Comparison, ByVal formula1 As String, ByVal formula2 As String)

The type of comparison Excel will use when comparing a cell value to formula1 and formula2. The comparison type must require two formulas and may be set to one of the following values: Comparison.CellValueBetween or Comparison.CellValueNotBetween.

The formula to use for the minumum value.

The formula to use for the maximum value.


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          ConditionalFormat condFmt = wb.CreateConditionalFormat();
          Condition cond =
               condFmt.CreateCondition(
               Condition.Comparison.CellValueGreaterThan,
               "=100");
          cond.ChangeCondition(
               Condition.Comparison.CellValueBetween,
               "=100",
               "=150");
        

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim condFmt As ConditionalFormat = wb.CreateConditionalFormat()
          Dim cond As Condition = _
               condFmt.CreateCondition( _
               Condition.Comparison.CellValueGreaterThan, _
               "=100")
          cond.ChangeCondition( _
               Condition.Comparison.CellValueBetween, _
               "=100", _
               "=150")