0% found this document useful (0 votes)
12 views

Conditional Formatting

The document discusses various ways to apply conditional formatting in Excel, including formatting cells based on cell values, formulas, highlighting every other row or column, clearing rules, and using predefined color scales, data bars, and icon sets.

Uploaded by

ag2503
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Conditional Formatting

The document discusses various ways to apply conditional formatting in Excel, including formatting cells based on cell values, formulas, highlighting every other row or column, clearing rules, and using predefined color scales, data bars, and icon sets.

Uploaded by

ag2503
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Conditional Formatting

Conditional Formatting
• Conditional formatting allows you to automatically apply formatting—such
as colors, icons, and data bars—to one or more cells based on
the cell value.
• For example, a conditional formatting rule might be: If the value is less
than $2000, color the cell red.
How to create a conditional formatting
rule
• Select the desired cells for the conditional formatting
rule.
• From the Home tab, click the Conditional
Formatting command. A drop-down menu will appear.
• Hover the mouse over the desired conditional
formatting type, then select the desired rule from the
menu that appears.
• A dialog box will appear. Enter the desired value(s) into
the blank field.
• Select a formatting style from the drop-down menu.
• The conditional formatting will be applied to the
selected cells.
Highlight Cells Rules
• Select the range
• On the Home tab, in the Styles group, click
Conditional Formatting.
• Click Highlight Cells Rules,( say,Greater Than).
• Enter the value and select a formatting style.
• Click OK.
Clear Rules

• 1. Select the range


• 2. On the Home tab, in the Styles group, click
Conditional Formatting.
• 3. Click Clear Rules, Clear Rules from Selected
Cells.
Top/Bottom Rules

• 1. Select the range


• 2. On the Home tab, in the Styles group, click
Conditional Formatting.
• 3. Click Top/Bottom Rules, Above Average.
• 4. Select a formatting style.
• 5. Click OK.
Conditional Formatting with Formulas

• Use a formula to determine which cells to format.


Formulas that apply conditional formatting must evaluate
to TRUE or FALSE.
• 1. Select the range
• 2. On the Home tab, in the Styles group, click Conditional
Formatting.
• 3. Click New Rule.
• Select 'Use a formula to determine which cells to format'.
• 5. Enter the formula =ISODD(A1)
• 6. Select a formatting style and click OK.
• Result. Excel highlights all odd numbers.
Another example
• Select the range A2:D7.
• Repeat previous steps 2-4.
• Enter the formula =$C2="USA"
• Select a formatting style and click OK.
• Result. Excel highlights all USA orders.
Highlighting Errors/Blanks
Example
• Select the dataset in which you want to highlight blank cells and
cells with errors.
• Go to Home –> Conditional Formatting –> New Rule.
• In the New Formatting Rule dialogue box select Use a formula to
determine which cells to format.
• Enter the following formula in the field in the ‘Edit the Rule
Description’ section =OR(ISBLANK(A1),ISERROR(A1))
• The above formula checks all the cells for two conditions – whether
it is blank or not and whether it has an error or not. If any of the
conditions is TRUE, it returns TRUE.
• Set the format that you want to apply to the cells that are blank or
have errors. To do this, click on the Format button. It will open the
‘Format Cells’ dialogue box, where you can specify the format.
• Click Ok.
Highlight Every Other Row/Column

• Select the dataset. In the example above, select A2:C13 (which excludes the header). If you want to
include the header as well, then select the entire data set.
• Open the Conditional Formatting dialogue box (Home–> Conditional Formatting–> New
Rule) [Keyboard Shortcut – Alt + O + D].
• In the dialogue box, select ‘Use a Formula to determine which cells to format’ dialogue box.
• Enter the following formula in the field in the ‘Edit the Rule Description’ section:
=ISODD(ROW())
• The above formula checks all the cells and if the ROW number of a cell is odd, then it returns TRUE.
The specified conditional format would be applied to all the cell that return TRUE.
• Set the format that you want to apply to the. To do this, click on the Format button. It will open the
‘Format Cells’ dialogue box, where you can specify the format.
• Click OK.
• Here are some examples:
• Highlight alternate even rows: =ISEVEN(ROW())
• Highlight alternate odd rows: =ISODD(ROW())
• Highlight every 3rd row: =MOD(ROW(),3)=0
Search and Highlight Data using
Conditional Formatting
• Suppose you have a dataset as shown below, with Products Name, Sales Rep, and Geography. The
idea is to type a string in cell C2, and if it matches with the data in any cell(s), then that should get
highlighted.
• Here are the steps to create this Search and Highlight functionality:
• Select the dataset.
• Go to Home –> Conditional Formatting -> New Rule (Keyboard Shortcut – Alt + O + D).
• In the New Formatting Rule dialogue box, select the option ‘Use a formula to determine which cells
to format’.
• Enter the following formula in the field in the ‘Edit the Rule Description’ section:
=AND($C$2<>"",OR(ISNUMBER(SEARCH($C$2,$B5:$D5))))
• Set the format that you want to apply to the cells that are blank or have errors. To do this, click on
the Format button. It will open the ‘Format Cells’ dialogue box, where you can specify the format.
• Click OK.
• The formula would return TRUE for a cell when two conditions are met:
• Cell C2 is not empty.
• The content of cell C2 exactly matches the content of the cell in the dataset.
Conditional formatting presets
• Excel has several predefined styles—or presets—you can use to quickly apply conditional
formatting to your data. They are grouped into three categories:
• Data Bars are horizontal bars added to each cell, much like a bar graph.

• Color Scales change the color of each cell based on its value. Each color scale uses a two- or
three-color gradient. For example, in the Green-Yellow-Red color scale, the highest values
are green, the average values are yellow, and the lowest values are red.

• Icon Sets add a specific icon to each cell based on its value.
References
• https://trumpexcel.com/excel-conditional-
formatting/#2
• https://exceljet.net/conditional-formatting-
formulas
• https://edu.gcfglobal.org/en/excel2016/condition
al-formatting/1/
• https://www.contextures.com/xlcondformat03.ht
ml#sample
• https://www.excel-easy.com/data-
analysis/conditional-formatting.html

You might also like