How to Highlight the Max Value in an Excel Chart Automatically
By ExcelReady TeamUpdated 6 min read
The short answer
Add two helper columns next to your data. One uses =IF(B2=MAX($B$2:$B$7),B2,NA()) to keep only the highest value, and the other keeps every other value. Chart both columns, set Series Overlap to 100% and give the max series its own colour. When the numbers change, the highlight moves to the new top bar automatically.
Key takeaways
- A chart can't colour one bar by a rule, so split the data into a max series and an everything-else series.
- The helper formula =IF(B2=MAX($B$2:$B$7),B2,NA()) keeps the top value and hides the rest.
- NA() is better than 0 or "" because charts skip #N/A instead of plotting it at zero.
- Set Series Overlap to 100% so the two series sit on top of each other and look like one set of bars.
- Ties are highlighted too: if two months share the top value, both bars change colour.
On this page+
- Why a chart can't highlight the max on its own
- Step 1: add the helper columns with IF and MAX
- Step 2: chart both series and overlap them
- Step 3: colour the max bar and add a label
- How to highlight the max value on a line chart
- How to highlight the min value or the top 3
- Common problems and fixes
- Practise it
To highlight the max value in an Excel chart automatically, you split the data into two helper columns: one holds only the highest value and the other holds everything else. You chart both columns, overlap them, and colour the max series. This guide is for anyone who builds monthly reports and wants the best month to stand out without recolouring a bar by hand every time the data changes.
Why a chart can't highlight the max on its own#
A chart colours whole series, not individual values by a rule, so you need a separate series for the top value. You can click one bar and change its fill, but that colour stays on that bar. When next month's data makes a different bar the highest, the old colour is now wrong.
Conditional formatting doesn't help either. It changes cells, not charts. The fix is to let a formula decide which value is the max, and to give that value its own series. If you are new to charts, start with the basics of Excel charts.
All examples use this sales table in A1:B7:
| A | B | |
|---|---|---|
| 1 | Month | Sales |
| 2 | Jan | 4,200 |
| 3 | Feb | 3,900 |
| 4 | Mar | 5,100 |
| 5 | Apr | 6,300 |
| 6 | May | 4,800 |
| 7 | Jun | 5,600 |
The highest value is 6,300 in April.
Step 1: add the helper columns with IF and MAX#
The helper columns use IF to test each row against the MAX of the column. Add two headings, Max in C1 and Other in D1, then type these formulas and fill them down to row 7 (Windows: Ctrl+D; Mac: ⌘D):
C2: =IF(B2=MAX($B$2:$B$7),B2,NA())
D2: =IF(B2=MAX($B$2:$B$7),NA(),B2)MAX($B$2:$B$7)finds the highest sales figure. The$signs lock the range so it doesn't move as you fill down.B2=MAX(...)is TRUE only on the top row.- C keeps the value when the test is TRUE and shows #N/A otherwise.
- D does the opposite: it shows #N/A on the top row and the value everywhere else.
The result: C5 shows 6,300 and every other C cell shows #N/A. Column D shows every value except April. The IF function guide and the MAX function guide explain both functions in detail, and the article on AVERAGE, MIN and MAX covers MAX with blanks and text.
Why NA() and not 0 or ""?#
Charts skip #N/A, so nothing is drawn for those rows. A 0 would add a point at zero on a line chart and a "0" data label if labels are on. A formula that returns "" also counts as zero on line charts. NA() keeps the chart clean. The #N/A values look untidy in the sheet, so you can grey out the helper columns or put them to the side.
Step 2: chart both series and overlap them#
Chart the Month, Max and Other columns, not the original Sales column. Each helper column becomes its own series.
- Select A1:A7, then hold Ctrl (Mac: ⌘) and select C1:D7.
- Go to Insert > Charts and choose a Clustered Column chart.
- Right-click any bar and choose Format Data Series.
- Set Series Overlap to 100%. The two series now sit in the same place, so each month shows one bar.
- Set Gap Width to taste, for example 60%.
Without the overlap, each month would show a thin bar and an empty gap next to it. The same steps work for a horizontal chart; see how to make a bar chart in Excel for the layout options.
Step 3: colour the max bar and add a label#
Give the Max series a strong colour and the Other series a quiet one, so the eye goes straight to the best month.
- Click the April bar once. This selects the whole Max series.
- In Format Data Series > Fill, pick a bold colour, such as dark blue.
- Click any other bar and give the Other series a light grey.
- Right-click the April bar and choose Add Data Labels. Only the max gets a label, because the other rows in that series are #N/A.
Now change Jun's sales from 5,600 to 7,000. The formulas move the value from column D to column C, and the June bar turns dark blue on its own. April goes grey. That is the "automatic" part.
To make the chart grow with new months, turn the data into a table first (Windows: Ctrl+T; Mac: ⌘T). New rows then pick up the helper formulas and join the chart.
How to highlight the max value on a line chart#
On a line chart, keep the full line and add the max as a single marker. The steps change slightly:
- Chart Sales (column B) and Max (column C) as a Line with Markers chart.
- Format the Max series: set Line to No line, and make the Marker larger and brightly coloured.
- Turn off markers on the Sales series if you want a plain line.
The Max series has only one real value, so you get one bright dot on the highest point. Here NA() is essential: with 0s, the Max series would draw a line along the bottom of the chart.
How to highlight the min value or the top 3#
The same pattern works for any rule you can write as a TRUE or FALSE test. Change only the test inside IF:
| Highlight | Formula for the highlighted column |
|---|---|
| Lowest value | =IF(B2=MIN($B$2:$B$7),B2,NA()) |
| Top 3 values | =IF(B2>=LARGE($B$2:$B$7,3),B2,NA()) |
| Above a target in F1 | =IF(B2>=$F$1,B2,NA()) |
| Above the average | =IF(B2>AVERAGE($B$2:$B$7),B2,NA()) |
The "other" column always uses the same test with the two results swapped. To highlight both the max and the min, use three helper columns: Max, Min and Other. For highlighting top values in cells rather than charts, see how to highlight the top 10 values. To draw a goal across the chart instead, follow how to add a target line to a chart.
Common problems and fixes#
Most problems come from the ranges or the chart data selection. Check these in order:
- Every bar is highlighted, or none is. The MAX range isn't locked. If C3 says
MAX(B3:B8), the range moved when you filled down. Use$B$2:$B$7. - Two bars are highlighted. Two months share the top value. That is correct behaviour. To keep only the first, test the row number:
=IF(ROW(B2)=MATCH(MAX($B$2:$B$7),$B$2:$B$7,0)+1,B2,NA()). - Thin bars with gaps. Series Overlap is not 100%.
- The chart still shows the original Sales series. Use Chart Design > Select Data and remove it, so only Max and Other are plotted.
- Numbers stored as text. MAX ignores text, so a text "9,000" is never highlighted. Convert the column to real numbers.
Practise it#
Every highlighted chart starts with the same two skills: a MAX over a locked range and an IF that picks one of two results. Practise the IF function in a live spreadsheet, then practise AVERAGE, MIN and MAX: you type each formula and ExcelReady checks it instantly. Start with the April helper cell in the exercise on this page.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Build the helper value for April. Click C5 and type =IF(B5=MAX($B$2:$B$7),B5,0), then press Enter. (In real Excel you would use NA() instead of 0.)
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Max | |||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 | ||||
| 10 |
Tip: Compare B5 with the MAX of the whole Sales column. Lock that range with $ signs so it stays put when you fill down.
Practise this in a lesson
Frequently asked questions
How do I make the highest bar a different colour in an Excel chart?
Add a helper column that keeps only the max value with =IF(B2=MAX($B$2:$B$7),B2,NA()) and a second column with all the other values. Chart both, set Series Overlap to 100%, and colour the max series differently.
Can conditional formatting change chart colours in Excel?
No. Conditional formatting only changes cells, not charts. To colour a chart by a rule, split the values into helper columns with IF and chart each column as its own series.
Why use NA() instead of 0 in the helper column?
Excel charts skip #N/A values. A 0 would draw a point at zero on a line chart and can add zero data labels, while #N/A leaves nothing behind.
How do I highlight the minimum value instead?
Swap MAX for MIN in both helper formulas, for example =IF(B2=MIN($B$2:$B$7),B2,NA()). Everything else in the chart setup stays the same.
What happens if two values tie for the maximum?
Both rows pass the test B2=MAX(...), so both bars move into the highlighted series. If you want only one, add a tie-break such as the first match with MATCH.