View on GitHub

dotnet-eud

.NET Controls End-User Documentation

Conditional Formatting

The Spreadsheet allows you to apply conditional formatting to a range of cells. Conditional formatting changes the appearance of individual cells based on specific conditions. It helps to highlight critical information, or describe trends within cells by using data bars, color scales and built-in icon sets. To create a conditional format, select the cell range to which you wish to apply a conditional formatting rule. On the Home tab, in the Styles group, click the Conditional Formatting button to display a drop-down list of available conditional formats. You can do one of the following.

Format Cells that are Less than, Greater than or Equal to a Value

To highlight cells whose values meet the criterion represented by a relational operator (=, <, >), do the following.

Format Cells that Contain Text or a Date

To highlight cells that contain the specified text string or time period, do the following:

Format Unique or Duplicate Cells

To find unique or duplicate values in a range of cells, do the following:

Format Top or Bottom Ranked Values

To highlight only the top or bottom ranked values in a range of cells, do the following:

Format the Cells whose Values are Above or Below the Average

To highlight values that are above or below the average in a range of cells, do the following:

Format Cells using Data Bars

The data bar conditional formatting rule draws a shaded bar in the background of each cell in the range to which the rule is applied. The length of the data bar represents the cell value. A longer bar represents a higher value, and a shorter bar represents a lower value. For example, the image below shows the markup magnitude using solid light-green data bars.

DataBarConditionalFormattingExample2

To apply a data bar conditional formatting rule, do the following:

Format Cells using Color Scales

Color scales compare values using a gradation of two or three colors. The shade of the color represents higher, middle and lower values in the cell range to which the rule is applied. For example, the image below shows a price distribution using a gradation of three colors. Red represents the lower values, yellow represents the medium values and sky blue represents the higher values.

ColorScale3ConditionalFormatting2

To create a color scale, do the following:

Format Cells using Icon Sets

An icon set conditional format classifies data in a range into three to five categories. The Spreadsheet divides the range into equal parts based on the number of icons in the selected set and applies an icon to each cell depending on its value. For example, the image below shows the value ranking. A filled star represents values that are greater than or equal to 67 percent, a half-filled star represents values that are less than 67 percent and greater than or equal to 33 percent, and an empty star shows values that are less than 33 percent.

Spreadsheet_IconSetExample

To apply an icon set conditional formatting rule, do the following:

Edit the Conditional Formatting Rule

You can modify existing conditional formatting rules by doing the following:

Clear Conditional Formatting Rules

To delete a conditional formatting rule, do one of the following: