[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IAboveAverage.SetLastPriority

SetLastPriority Method

SetLastPriority()

Moves this conditional formatting rule to the lowest evaluation priority among all conditional formatting rules on the worksheet.

Use this method to move the current conditional formatting rule based on the average or standard deviation to the lowest evaluation priority among the conditional formatting rules in the worksheet.

Declaration
void SetLastPriority()
Sub SetLastPriority()
Examples
worksheet.Range["A1:B5"].Value = new object[,] {{10, 5}, {30, 15}, {20, 25}, {50, 35}, {40, 45}};
IAboveAverage firstRule = worksheet.Range["A1:A5"].FormatConditions.AddAboveAverage();
firstRule.Interior.Color = Color.Yellow;
IAboveAverage secondRule = worksheet.Range["B1:B5"].FormatConditions.AddAboveAverage();
secondRule.Interior.Color = Color.LightBlue;
secondRule.Priority = 1;
secondRule.SetLastPriority();
int priority = secondRule.Priority;