keepcalculator

06 Numbers and Powers

Highlight Above & Below Average Values in Excel

Card No. 06·88609 · Updated · Standard formula, shown below

This guide shows you how to visually flag numbers that fall above or below the average in a dataset using conditional formatting in Microsoft Excel. You’ll learn two methods: a quick built-in rule and a more flexible formula-based approach, letting you highlight entire rows or apply custom thresholds.

What You’ll Need

  • Microsoft Excel 2010 or later (including Excel for Microsoft 365, Excel 2021, 2019, 2016).
  • A worksheet containing the numeric data you want to analyze.
  • Basic familiarity with selecting cells and navigating Excel’s ribbon.

Step-by-Step

Method 1: Using the Built-in Above/Below Average Rule

  1. Select the data range – Click and drag to highlight the cells containing the numbers you want to evaluate. For example, if your values are in cells A2:A100, select that block.
  2. Open Conditional Formatting – On the Home tab, in the Styles group, click Conditional Formatting.
  3. Choose the rule – Hover over Top/Bottom Rules, then click Above Average or Below Average (you’ll apply one at a time).
  4. Set the format – In the dialog box that appears, pick a formatting style from the dropdown (e.g., Light Red Fill with Dark Red Text). Click OK. All cells above the average are now highlighted.
  5. Add the second rule – Repeat steps 2–4, but choose Below Average and select a different format (e.g., Green Fill with Dark Green Text). Now both groups are visually distinct.

Method 2: Using a Formula for More Control

This method lets you highlight entire rows or use a custom threshold (e.g., above average + 10%).

  1. Select the range – Highlight the cells or rows you want to format. If you want entire rows, select the full range (e.g., A2:C100).
  2. Create a new rule – Go to Home > Conditional Formatting > New Rule.
  3. Choose formula rule – In the dialog, select Use a formula to determine which cells to format.
  4. Enter the formula – For above average, use: =A2>AVERAGE($A$2:$A$100) (adjust the range to match your data; the first cell reference should be the top-left cell of your selection). For below average, use: =A2<AVERAGE($A$2:$A$100).
  5. Set the format – Click the Format button, choose a fill or font color, then click OK twice to apply.
  6. Add the opposite rule – Repeat steps 2–5 with the other formula to highlight the other group.

Highlighting Entire Rows

If your data includes labels or other columns and you want to highlight the whole row based on one numeric column, use the formula method but apply it to the entire row range. For example, if column A has names and column B has scores, select A2:C100 and use the formula =$B2>AVERAGE($B$2:$B$100). The dollar sign before the column letter locks the column reference, so the rule applies to each row based on its own B value.

Common Mistakes

  • Mixing up relative and absolute references – In formula-based rules, forgetting the dollar signs (e.g., using A2 instead of $A$2) can cause the average range to shift as the rule is applied to each cell, giving wrong results.
  • Selecting the wrong range – If you select the entire column (e.g., A:A), the rule will evaluate empty cells as 0, dragging the average down and highlighting blanks.
  • Applying rules in the wrong order – If you use both above and below average rules, ensure they don’t conflict. Excel stops at the first true rule, so if both apply to the same cell (e.g., when a value equals the average), only the first rule’s format shows.
  • Ignoring hidden rows or filters – The AVERAGE function includes hidden rows, so if you filter data, the average may not reflect what you see.

Tips

  • Use the built-in rule for quick results – It’s faster and automatically updates if your data changes.
  • Customize the average threshold – To highlight values significantly above average, modify the formula to =A2>AVERAGE($A$2:$A$100)*1.1 (10% above average).
  • Use different colors for clarity – Choose high-contrast colors (e.g., red for above, green for below) to make the pattern instantly visible.
  • Combine with data bars – For a quick visual, try Conditional Formatting > Data Bars instead; they show magnitude, not just above/below.
  • Manage rules – Use Conditional Formatting > Manage Rules to edit, delete, or change the order of your rules.

Troubleshooting

  • No highlighting appears – Check that your selected range contains numbers (not text). Also, verify the formula’s range references match your data. For the built-in rule, ensure you didn’t accidentally apply it to a single cell.
  • All cells are highlighted – This often happens when the formula uses a relative reference for the average range. For example, =A2>AVERAGE(A2:A100) will recalculate the average for each row, making it likely that many cells qualify. Use absolute references ($A$2:$A$100).
  • Highlighting doesn’t update when data changes – Conditional formatting recalculates automatically, but if you see stale results, press F9 to force a recalculation or check that calculation is set to automatic (Formulas tab > Calculation Options).
  • Wrong cells are highlighted – If you selected entire rows, ensure the formula’s column reference is correct. For example, if your numeric column is C, use =$C2>AVERAGE($C$2:$C$100).

Frequently Asked Questions

Can I highlight values above a specific number instead of the average?

Yes. Use the formula method with a fixed number, e.g., =A2>100, or use the built-in Greater Than rule under Highlight Cells Rules.

Does the average include the cell being evaluated?

Yes, the AVERAGE function includes all cells in the specified range, including the current cell. This is standard for highlighting above/below average.

How do I highlight values that are exactly equal to the average?

Use a formula like =A2=AVERAGE($A$2:$A$100). Note that floating-point precision might cause issues, so consider rounding: =ROUND(A2,2)=ROUND(AVERAGE($A$2:$A$100),2).

Can I apply this to non-adjacent columns?

Yes, but you need to create separate rules for each column or use a formula that references the correct column relative to the selection. For example, if you select columns A and C, use =OR(A2>AVERAGE($A$2:$A$100), C2>AVERAGE($C$2:$C$100)) – but this gets complex. Simpler: apply the rule separately to each column.

Why does my rule highlight blank cells?

Blank cells are treated as 0 by AVERAGE, so they may fall below the average. To exclude blanks, add a condition like =AND(A2<>"", A2>AVERAGE($A$2:$A$100)).

Will the highlighting work if I sort or filter the data?

Yes, conditional formatting moves with the cells when you sort. When you filter, hidden rows are not evaluated, but the average still includes them, so the highlighting may not reflect the visible subset. For a dynamic average based on visible cells, you’d need a more advanced formula using SUBTOTAL or AGGREGATE.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →