Quick, clean, and to the point

This video comes from our online video training for Excel.

How to highlight rows with conditional formatting

In this Exceljet tip, we show you how to highlight entire rows in a list using conditional formatting with a formula. This is a handy way to visually expose information you are interested in without having to apply a filter. We also show you how to move the input for the rule - the content you want to highlight - onto the worksheet where it is much more convenient to work with.
Video Transcript 

Using conditional formatting, It's easy to highlight cells that match a certain condition. However, it's a little trickier to highlight entire rows in a list that contains multiple columns.

In this video, we'll show you how to use a formula with conditional formatting to highlight an entire row in a multi-column list.

Let's take a look.

Here we have a task list that contains a number of columns - priority, task, owner, and due date.

If we want to highlight all tasks that that are assigned to Bob, we could use the Conditional formatting rule "Text that contains" and then enter "Bob" for the text to match. However this rule only highlights individual cells, and it also catches any cells that just mention Bob.

To highlight rows in the table that contain tasks assigned to Bob, we need to take a different approach.

First, select all of the data in the list. Then, choose New Rule from the conditional format menu on the Home tab of the ribbon.

For style, choose "Classic". Then select "Use a formula to determine which cells to format". The formula needs to test cell values in the Owner column, which is column D, so we enter:


To make sure we are testing only values in column D, we use a dollar sign to lock the column. As the formula is evaluated in each cell of the list, we want the rows to change, so no need to use a dollar sign there.

This formula will return TRUE for each cell in a row where the owner equals "Bob".

To adjust the formatting for a more custom look, just edit the rule and choose Custom Format. Then define a format of your choice.

Like all conditional formats, the formatting is dynamic and will change when cells are updated to contain values matched by the rule.

At this point, your probably thinking "That's pretty cool, but who wants to update a rule to highlight a different name?"

Good point. Let's move the match value out onto the worksheet, where it's more convenient. First, format and label a cell to use for input. Then, adjust the rule formula to use the input cell instead of a hard-coded value.

Now the rule will highlight rows that match the name in the input cell.

Dave Bruns