How to Insert a Heat Map in Excel: Step-by-Step
In this article
You can add a heat map to Excel in about a minute using Conditional Formatting: select your range, go to Home > Conditional Formatting > Color Scales, and pick a scale. Excel shades each cell by its value, so high and low numbers stand out instantly. This works in Excel for Microsoft 365, Excel 2021, 2019, and 2016 on Windows and Mac, and in Excel for the web. Menu labels can differ slightly by version, device, or region, but the path is the same.
What You'll Need
- A spreadsheet open in Excel (desktop or web) with a range of numeric values to shade.
- Your data laid out so each row and column has a clear label, ideally with headers.
- No add-ins required; Conditional Formatting is built into Excel.
Step-by-Step
- Select the data range you want shaded. Click the top-left cell and drag to the bottom-right cell, or click the first cell and hold Shift while clicking the last. Include only the numeric cells, not the header row or totals, unless you want those shaded too.
- Open Conditional Formatting. On the Home tab, in the Styles group, click Conditional Formatting. On Excel for the web, the button is also on the Home tab.
- Choose Color Scales. Hover over Color Scales to see the built-in options. Excel offers three-color scales (for example green-yellow-red) and two-color scales (for example white to red).
- Pick a scale. Click one. Excel applies it immediately and shades each cell according to its value relative to the rest of the selected range.
- Adjust the scale if the default is misleading. With the range still selected, go to Conditional Formatting > Manage Rules, select the Color Scale rule, and click Edit Rule. You can change the colors and set Minimum, Midpoint, and Maximum to Percent, Percentile, Number, or Formula. For example, set Minimum to Number 0 and Maximum to Number 100 if your data is a percentage score.
- Apply the same rule to other ranges. Use the Format Painter on the Home tab: select a formatted cell, click Format Painter, then drag over the new range. Alternatively, copy a formatted cell and use Paste Special > Formats.
- Remove a heat map. Select the range, go to Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
Common Mistakes
- Selecting the header row. Text cells are ignored by color scales, but including headers can shift the range Excel evaluates. Select only the numbers.
- Leaving totals in the range. A sum or average that is much larger than the individual values will skew the scale and wash out the detail. Exclude totals or format them separately.
- Using a heat map on text. Color scales only respond to numbers. For text categories, use Highlight Cells Rules or a formula-based rule instead.
- Assuming the colors mean fixed thresholds. By default, Excel shades relative to the minimum and maximum in the selected range, so the same color can mean different values in different ranges. Edit the rule if you need fixed cutoffs.
- Forgetting that the rule travels with the cell. If you copy a shaded cell, the rule may come with it and affect the destination range. Use Paste Special > Values if you only want the numbers.
Tips
- Use a two-color scale for data with one meaningful direction (for example, higher is better) and a three-color scale when there is a meaningful midpoint.
- Keep colors accessible: red-green scales are hard to read for people with color vision deficiency. A blue-to-red or white-to-red scale is often clearer.
- Apply the rule to a whole table column rather than individual cells so it updates automatically when you add rows.
- Combine a heat map with a legend or a note explaining what the colors mean, especially if you share the file.
- For a true grid heat map (rows versus columns), arrange your data as a matrix with row labels down the left and column labels across the top, then select only the matrix cells.
Troubleshooting
- Nothing changes after you pick a scale. Check that the selected cells contain numbers, not text that looks like numbers. A cell with a leading apostrophe or a space is text. Use Data > Text to Columns or retype the value.
- The colors look wrong or all the same. Your range likely includes an outlier or a total. Edit the rule and set fixed Minimum and Maximum values, or exclude the outlier from the selection.
- The rule does not apply to new rows. Conditional Formatting applies to the range you selected. Select the full column or convert your data to a table (Insert > Table) and apply the rule to the table column.
- You cannot find Manage Rules. It is under Conditional Formatting on the Home tab. On Excel for the web, rule management is more limited; use the desktop app for fine control.
- The file looks different on another computer. Colors can render differently by display and theme. The rule itself is stored in the workbook, so the values are the same; only the appearance may vary.
Frequently Asked Questions
Can I make a heat map from text values?
Not with Color Scales directly. Convert categories to numbers first, or use Highlight Cells Rules to shade cells that contain specific text.
Does a heat map change my data?
No. Conditional Formatting only changes appearance. The underlying values stay the same, and clearing the rule restores the original look.
Can I use a custom color for the heat map?
Yes. In Edit Rule, choose the color picker for Minimum, Midpoint, and Maximum and select any color, including custom RGB values.
Will the heat map print?
Yes, conditional formatting prints with the sheet. Check Print Preview to confirm the colors are visible and adjust the printer settings if needed.
Can I apply a heat map to a PivotTable?
Yes. Select the PivotTable values and apply a color scale the same way. If the PivotTable refreshes and changes size, reapply the rule to the new range.
Is a heat map the same as a chart?
No. A heat map is cell shading, not a chart object. For a chart-style heat map, you would need to build it manually or use a dedicated add-in, which is not built into Excel.