[]
Moves this conditional formatting rule to the highest 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 highest evaluation priority among the conditional formatting rules on the same worksheet.
void SetFirstPriority()
Sub SetFirstPriority()
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.SetFirstPriority();
int priority = secondRule.Priority;