Excel Guide: Conditional Formatting [In 5 Minutes!]

 

Conditional Formatting formats a cell or group of cells based on your own conditions.

There are a lot of options, but they are all simple to implement with this guide!

On our Excel Courses, we teach a wide range of conditional formatting options, and they are simple to implement in your worksheets.

Conditional formatting In Excel

Simple Example – Conditional Formatting

Our data set has student grades for a test.

We want to highlight everyone that scored above 10.

Showing the source data

Select cells B5:B20.

Screenshow of the cell range B5:B20

With cell range B5:B20 still selected, go to the Styles group on the Home Tab (Step 1 in the image) and select Conditional Formatting (Step 2 in the image).

Screenshot showing the Conditional Formatting Option in the Styles group on the Home Tab

Select Highlight Cells Rules and then Greater Than…

Shows the Highlight Cells Rules and Greather Than.. options highlighted

The Greater Than Window should appear.

Enter 7 in the textbox underneath the Format cells that are GREATER THAN: section and leave the format as Light Red Fill with Dark Red Text.

Screenshot showing the Greater Than Window with the Format cells that are GREATER THAN: section highlighted as well as the format option

Click Ok.

All the cells that contain a value greater than 7 should now be highlighted with the Light Red Fill with Dark Red Text.

Screenshot showing all the values greater than 7 highlighted through conditional formatting being applied

You can also use conditional formatting to make heat maps in Excel.

Using Custom Conditions

You can create your own formulas for custom conditions. In our example, we have a list of projects and the staff member responsible for the project recorded.

Screenshot showing the source data for the custom condition conditional formatting example.

We want to see which staff members other than Stephnie Rollins and Candie Swimton are responsible for projects. So, we will need a custom condition.

Select the cell range B5:B15.

With this range selected, go to the Styles group on the Home Tab and select Conditional Formatting and choose New Rule…

Screenshot showing the Conditional Formatting and New Rule... option highlighted.

The New Formatting Rule Dialog Box should appear.

Screenshot showing the New Formatting Rule Dialog Box.

Select the Use a formula to determine which cells to format option.

This lets you use Functions and Formulas to write your own rules!

=NOT(OR(B5=”Stephnie Rollins”,B5=”Candie Swimton”))

 

Excel will start by looking at the value in cell B5 and then going down the rows in the selected range and only format those names that are not Stephnie Rollins or Candie Swimton.

Screenshot showing the Use a formula to determine which cells to format option highlighted and the formula itself highlighted.

Click on the Format… button, and you can choose any format that you’d like, but in this case, we are going to use a light green fill.

Screenshot showing the Fill Tab with light green chosen.

Click Ok. You should now see a preview of what the formatting will look like.

Screenshot showing the preview of what the conditional formatting will look like highlighted.

Click Ok again. The staff other than Stephnie Rollins and Candie Swimton are highlighted.

Screenshot showing all the staff that are not Stephnie Rollins or Candie Swimton highlighted

Clear Conditional Formatting from Cells

If you would like to clear the conditional formatting from your cells or worksheet. You can do so in the following way.

Select the cell range containing the conditional formatting, which in this case is range B5:B16.

Screenshot showing the source data for the Clear Conditional Formatting example.

With this range selected, go to the Styles group on the Home Tab and select Conditional Formatting.

Choose Clear Rules and then Clear Rules from Selected Cells.

Screenshot showing the Clear Rules and the Clear Rules from Selected Cells option highlighted.

The conditional formatting should now be cleared from the selected cells.

Screenshot showing the conditional formatting cleared from the selected cells.

Conclusion

Excel’s conditional formatting options are powerful and allow you to format data according to simple criteria and to use your own formulas for more advanced criteria.

You will often see conditional formatting applied in advanced dashboards and reports.

Casual Excel users and professional Excel users can make use of the conditional formatting options that Excel provides, and it’s available on Excel for Web as well for easy collaboration with colleagues.

Another case where conditional formatting can be used is when looking for outliers in a dataset!

Special thank you to Taryn Nefdt for collaborating on this article.

About Ben Richardson

Ben is a director of Acuity Training which he has been running for over 10 years.


He is a Natural Sciences graduate from the University of Cambridge and a qualified accountant with the ICAEW.


He previously worked as a venture capitalist and banker and so had extensive experience with Excel from building financial models before moving to learn SQL, Microsoft Power BI and other technologies more recently.