Share this page:

MS Excel: Automatically highlight highest and lowest values in a range of cells in Excel 2010

Question: In Microsoft Excel 2010, is there a way to shade one cell green if it is the highest value in a range of cells, and to shade another cell red if it is the lowest number in a range of cells?

Answer: Yes, you can use conditional formatting to highlight the highest and lowest values in a range of cells.

First highlight the range of cells. In this example, we've selected cells A1 through A5.

Select the Home tab in the toolbar at the top of the screen. Then in the Styles group, click on the Conditional Formatting drop-down and select Manage Rules.

Microsoft Excel

When the Conditional Formatting Rules Manager window appears, click on the "New Rule" button to enter the first condition.

Microsoft Excel

When the New Formatting Rule window appears, select Format only top or bottom ranked values as the rule type.

Then select Top in the first drop down, and enter 1 in the final box. In our example, we've selected only the first top value.

Next, we need to select what formatting to apply when this condition is met. To do this, click on the Format button.

Microsoft Excel

When the Format Cells window appears, select the Fill tab. Then select the color that you'd like to see for the highest value in the range. In this example, we've selected green. Then click on the OK button.

Microsoft Excel

When you return to the New Formatting Rule window, you should see the preview of the formatting in the Preview box. In this example, the preview box shows green as the fill color. Next click on the OK button.

Microsoft Excel

This will return you to the Conditional Formatting Rules Manager window.

You will need to click on the New Rule button again.

Microsoft Excel

When the New Formatting Rule window appears, we need to set up the second condition.

Select Format only top or bottom ranked values as the rule type.

Then select Bottom in the first drop down, and enter 1 in the final box. In our example, we've selected only the first bottom value.

Next, we need to select what formatting to apply when this second condition is met. To do this, click on the Format button.

Microsoft Excel

When the Format Cells window appears, select the Fill tab. Then select the color that you'd like to see for the lowest value in the range. In this example, we've selected red. Then click on the OK button.

Microsoft Excel

When you return to the New Formatting Rule window, you should see the preview of the formatting in the Preview box. In this example, the preview box shows red as the fill color. Next click on the OK button.

Microsoft Excel

Your Conditional Formatting window should now look like this.

Microsoft Excel

Click on the OK button.

Now when you return to the spreadsheet, the conditional formatting will be applied. As you can see, the -3 value appears in a red cell while the 200 value appears in a green cell.

Microsoft Excel