Lesson 48 of 92 · Free Excel Course
Excel
Heatmap in Excel: Color Scales, Data Bars and a Heat-Map Calendar
Make a heat map in Excel with Color Scales, set your own min, midpoint and max, add data bars (even negative ones) and build a heat-map calendar.
A heat map in Excel is a table where every cell is shaded by its value, so the big numbers and the small ones jump out without reading a single figure. Excel has no heat map chart; you make one with Conditional Formatting > Color Scales, and its close cousin, Data Bars, draws a small bar inside each cell instead. This lesson builds a sales heat map for five reps over six months, shows how Excel picks the colors (lowest, 50th percentile, highest), adds data bars including negative ones, and turns a month of daily numbers into a heat-map calendar.
What a heat map shows
Take a table of monthly sales for five reps. As plain numbers, it takes a while to spot that Chloe is strongest, Dev is weakest and everyone picked up in November and December. Shade the cells and you see it in a second.
Excel offers three "in-cell chart" tools, all on Home > Conditional Formatting:
| Tool | What it does | Best for |
|---|---|---|
| Color Scales | Shades each cell on a 2- or 3-color gradient | Grids: rep × month, hour × weekday, a calendar |
| Data Bars | Draws a bar in each cell, longer for bigger values | One column you want to compare, like totals |
| Icon Sets | Puts an arrow, flag or traffic light in each cell | Up/flat/down or good/OK/bad at a glance |
The conditional formatting lesson introduces all the rule types. Here we go deeper into the first two.
Make a heat map with Color Scales
Open the Practice sheet in the practice workbook.
- Select B2:G6, the 30 sales numbers only. Leave out the headings, the Total column (H) and the Total row (7).
- Choose Home > Conditional Formatting > Color Scales.
- Point at the presets to preview them, and click the first one, Green - Yellow - Red Color Scale.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Jul | Aug | Sep | Oct | Nov | Dec | Total |
| 2 | Ana | 42 | 38 | 45 | 51 | 58 | 63 | 297 |
| 3 | Ben | 29 | 31 | 27 | 35 | 40 | 44 | 206 |
| 4 | Chloe | 55 | 60 | 52 | 48 | 66 | 72 | 353 |
| 5 | Dev | 18 | 22 | 25 | 20 | 30 | 36 | 151 |
| 6 | Eli | 37 | 33 | 41 | 46 | 44 | 50 | 251 |
How does Excel choose each color? A 3-color scale has three anchor points:
- Minimum: the lowest value, 18, gets pure red.
- Midpoint: the 50th percentile, the value with half the numbers below it, gets pure yellow. With 30 values that's halfway between the 15th (41) and 16th (42): 41.5.
- Maximum: the highest value, 72, gets pure green.
Every other cell gets a blend in between. Dev's 30 in November sits about halfway from 18 to 41.5, so it's orange. You can check the anchors with formulas: the Scale check in L2:L4 has =MIN(B2:G6), =PERCENTILE.INC(B2:G6,0.5) and =MAX(B2:G6).
A 2-color scale works the same way with only two anchors, lowest and highest. The presets are named by the color for the highest value first, so Green - Yellow - Red means high is green and Red - Yellow - Green means high is red (handy when low is good, like costs or complaints).
Change the minimum, midpoint and maximum
The presets are a starting point. To set the anchors yourself:
- Click any cell in B2:G6 and choose Home > Conditional Formatting > Manage Rules.
- Select the Graded Color Scale rule and click Edit Rule.
- For Minimum, Midpoint and Maximum, choose a Type and a Value, and pick a color for each.
The types are:
| Type | Use it when... | Example |
|---|---|---|
| Lowest / Highest Value | You want the real min and max (the default) | — |
| Number | There's a meaningful fixed value | Midpoint = 50, the monthly target |
| Percent | You want a share of the range from min to max (0–100) | Minimum = 10 |
| Percentile | You want to ignore extreme values | Minimum = 10th percentile |
| Formula | The anchor lives in a cell | Midpoint =$L$7 |
Try it: set the Midpoint to Number, 50, the December target in L7. Now only results above target go green, and everything below 50 is yellow to red. The Minimum must stay below the Midpoint and the Midpoint below the Maximum, or Excel won't accept the rule.
Data bars: gradient, solid, negatives and bars only
Data bars work best on a single column. Select H2:H6 (the totals) and choose Home > Conditional Formatting > Data Bars. The top row of the gallery is Gradient Fill, which fades to white at the end; the bottom row is Solid Fill, one flat color that's easier to compare and print.
| G | H | |
|---|---|---|
| 1 | Rep | Total |
| 2 | Ana | 297 |
| 3 | Ben | 206 |
| 4 | Chloe | 353 |
| 5 | Dev | 151 |
| 6 | Eli | 251 |
Negative values. Column I holds December minus the target of 50: Ana 13, Ben −6, Chloe 22, Dev −14, Eli 0. Give it a data bar and Excel draws an axis inside the cells, with positive bars going right and negative bars going left, red by default. To change that, open Edit Rule and click Negative Value and Axis: you can pick the negative bar color and put the axis at the cell midpoint, or turn it off.
Show Bar Only. In Edit Rule, tick Show Bar Only to hide the numbers. A neat trick is to keep the numbers in one column and put a copy next to it (=H2 filled down) that shows only the bars:
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Total | Bar |
| 2 | Ana | 297 | 297 |
| 3 | Ben | 206 | 206 |
| 4 | Chloe | 353 | 353 |
| 5 | Dev | 151 | 151 |
| 6 | Eli | 251 | 251 |
How long is each bar? With all-positive numbers, Excel's Automatic minimum starts the bars at zero, so a bar half as long means roughly half the value. You can set the Minimum and Maximum types in Edit Rule exactly as for color scales.
Build a heat-map calendar
A calendar heat map shows a month of daily numbers in the shape of a calendar, so weekends, holidays and busy weeks stand out. Go to the Calendar sheet: A2:B32 lists December 2026 with a bakery's daily orders, and the grid in D3:J13 is already built with formulas.
- E1 holds the month, 12/1/2026.
- D4, the first Sunday on the grid:
=$E$1-WEEKDAY($E$1)+1. December 1, 2026 is a Tuesday, WEEKDAY returns 3, so D4 is November 29. Each next cell is the one before plus 1, and each week row starts at the previous Saturday plus 1. - D5, the orders under each date:
=IF(MONTH(D4)=MONTH($E$1),VLOOKUP(D4,$A$2:$B$32,2,FALSE),""). Days outside December stay blank.
Now color only the order rows. Hold Ctrl (Cmd on a Mac) and select D5:J5, D7:J7, D9:J9, D11:J11 and D13:J13, then choose Color Scales > Green - White Color Scale (highest green, lowest white). Selecting the date rows too would be a mistake: dates are numbers (around 46,000), so they would swamp the scale.
| D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|
| 3 | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 4 | Nov 29 | Nov 30 | Dec 1 | Dec 2 | Dec 3 | Dec 4 | Dec 5 |
| 5 | 42 | 45 | 48 | 61 | 74 | ||
| 6 | Dec 6 | Dec 7 | Dec 8 | Dec 9 | Dec 10 | Dec 11 | Dec 12 |
| 7 | 58 | 39 | 44 | 47 | 50 | 66 | 80 |
| 8 | Dec 13 | Dec 14 | Dec 15 | Dec 16 | Dec 17 | Dec 18 | Dec 19 |
| 9 | 63 | 41 | 46 | 52 | 57 | 72 | 88 |
| 10 | Dec 20 | Dec 21 | Dec 22 | Dec 23 | Dec 24 | Dec 25 | Dec 26 |
| 11 | 70 | 55 | 64 | 79 | 95 | 12 | 68 |
| 12 | Dec 27 | Dec 28 | Dec 29 | Dec 30 | Dec 31 | Jan 1 | Jan 2 |
| 13 | 49 | 35 | 38 | 43 | 60 |
Notice what Christmas Day does: with only 12 orders, it becomes the white end of the scale, and most normal days end up in similar mid-greens. Fix it in Edit Rule by setting the Minimum to Percentile, 10. The 10th percentile is 39 (Check cell M5), so 12, 35, 38 and 39 are all white and the other days spread across more shades.
Icon sets in one minute
Icon Sets sort values into three to five groups and show a symbol for each, such as green up arrows for the top third. Select H2:H6 and try Conditional Formatting > Icon Sets > 3 Arrows (Colored). In Edit Rule you can set the cut-off values, choose Reverse Icon Order, or tick Show Icon Only. Icons work well next to numbers in a report; for a grid of 30 values, a color scale is easier to read.
When a heat map misleads
- Red and green look alike to many readers. Red-green is the most common type of color blindness. For anything you share, prefer a one-color scale (Green - White or Red - White) or Blue - White - Red, and keep the numbers visible.
- One outlier squashes the scale. A single huge or tiny value takes an end color and pushes everything else into the middle, as Christmas Day did. Use a Percentile minimum or maximum.
- Totals inside the range. Include the Total column and row, and the totals (up to 1,258) become the only green cells while every monthly figure turns red.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Rep | Jul | Aug | Sep | Oct | Nov | Dec | Total |
| 2 | Ana | 42 | 38 | 45 | 51 | 58 | 63 | 297 |
| 3 | Ben | 29 | 31 | 27 | 35 | 40 | 44 | 206 |
| 4 | Chloe | 55 | 60 | 52 | 48 | 66 | 72 | 353 |
| 5 | Dev | 18 | 22 | 25 | 20 | 30 | 36 | 151 |
| 6 | Eli | 37 | 33 | 41 | 46 | 44 | 50 | 251 |
| 7 | Total | 181 | 184 | 190 | 200 | 238 | 265 | 1258 |
- Mixed units. Sales in dollars next to a percentage column on one scale compares apples with oranges. Give each kind of number its own rule.
- Separate rules, separate scales. Two tables with their own rules each get their own min and max, so the same number can be a different color in each. Use one rule, or fixed Number anchors, when you want them comparable.
Mac and Excel for the web
Mac: the same Home > Conditional Formatting menu has Data Bars (gradient or solid fill), Color Scales and Icon Sets. To change the anchors, choose Manage Rules, select the rule and edit it. Use Cmd-click to select the calendar rows.
Excel for the web: Home > Conditional Formatting > Color Scales and Data Bars offer the same presets. Manage Rules opens a pane on the right; click the pencil next to a rule to edit it. For the full set of data bar options, such as the negative axis, use the desktop app.
Try it yourself
Download the practice workbook. Our builder can't save color scales or data bars, so you apply them, and the Answer key sheet shows the colors you should see, with every cell's hex code (red F8696B, yellow FFEB84, green 63BE7B, white FCFCFF and the blends between).
- On Practice, apply Green - Yellow - Red to B2:G6 and check L2:L4 show 18, 41.5 and 72.
- Edit the rule: set the Midpoint to Number, 50, and compare.
- Add Solid Fill data bars to H2:H6 and Gradient Fill bars to I2:I6 (with negatives), then tick Show Bar Only on one.
- On Calendar, Ctrl-select the five order rows and apply Green - White.
- Set the Minimum to Percentile, 10 and watch the shades spread out.
- Add 3 Arrows to H2:H6, then clear it with Clear Rules > Clear Rules from Selected Cells.
Common mistakes
- Selecting the headings or totals with the data. Select the numbers only.
- Including the calendar's date rows in the color scale. Ctrl-select the value rows.
- Blank cells typed as 0. A 0 becomes the lowest color; leave cells truly empty (or
""from a formula) so the scale ignores them. - Reading the preset name backwards. The first color is for the highest value.
- Midpoint at or past the maximum. Minimum, Midpoint and Maximum must go up in that order.
- Hiding numbers with white font. White text shows up on every colored cell of a heat map. Use the
;;;number format or Show Bar Only.
What's next
You can now turn any grid of numbers into a heat map, control where its colors start and stop, add data bars that handle negatives, and build a heat-map calendar. The previous lesson, forms and checkboxes, builds a checklist you could add data bars to. Next, CAGR and growth rates works out how fast numbers like these are growing. Or go back to the full Excel course.
Frequently asked questions
How do I make a heat map in Excel?
Select the numbers only (not headings or totals), then choose Home > Conditional Formatting > Color Scales and pick a scale, such as Green - Yellow - Red. Excel colors every cell by its value: the highest green, the middle yellow, the lowest red. There's no heat map chart type; a heat map in Excel is this conditional formatting.
How do I change the colors or the midpoint of a heat map?
Click a cell in the range, choose Home > Conditional Formatting > Manage Rules, select the color scale rule and click Edit Rule. For Minimum, Midpoint and Maximum you can pick Lowest/Highest Value, Number, Percent, Percentile or Formula, and pick a color for each. To flip the colors, choose the reversed preset (Red - Yellow - Green) instead.
How do I show only the colors and hide the numbers?
For a color scale, select the cells, press Ctrl+1, choose Custom and type three semicolons (;;;) as the format. The values are still there (you see them in the formula bar) and the colors still work. For data bars, edit the rule and tick Show Bar Only.
How do data bars handle negative numbers?
Excel draws negative values as bars going the other way from an axis, red by default. In Edit Rule, click Negative Value and Axis to change the negative bar color and where the axis sits (automatic, the middle of the cell, or none).
Why do the same numbers get different colors in two heat maps?
Each color scale rule works out its own lowest, middle and highest value from the cells it covers. A 50 in a range from 40 to 60 is the middle; in a range from 0 to 500 it's near the bottom. To compare two tables fairly, apply one rule to both, or use Number types with the same fixed values in both rules.
Which heat map colors are color-blind friendly?
Red-green is the most common kind of color blindness, so the default Green - Yellow - Red scale is hard for many people to read. A one-color scale (such as Green - White) or the Blue - White - Red scale works better, and showing the numbers in the cells helps everyone.