[]
Returns a new IUniqueValues object representing a conditional formatting rule for the specified range.
The returned rule is added to this collection and is configured to evaluate unique values in the represented range.
IUniqueValues AddUniqueValues()
Function AddUniqueValues() As IUniqueValues
| Type | Description |
|---|---|
| IUniqueValues | The IUniqueValues object for the new conditional formatting rule. |
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{100}, {100}, {200}, {300}, {300}};
IUniqueValues condition = range.FormatConditions.AddUniqueValues();
condition.Interior.Color = Color.Yellow;