A treemap chart in Excel uses nested rectangles to represent a hierarchy of data, where the size of each rectangle corresponds to a numerical value. This allows you to visualize proportions and spot patterns across different categories and sub-categories at a single glance. To create one, you need a dataset organized in a hierarchical structure (Category > Sub-category > Value) and a version of Excel that supports the Treemap chart type.

What You'll Need

  • Microsoft Excel (2016 or newer)
  • A dataset with at least one category column and one numerical value column
  • Data organized in a clean table format without empty rows or columns within the range

Step-by-Step

  1. Organize Your Data: Arrange your data in columns. The leftmost column should be the broadest category, the next column the sub-category, and the final column the numerical value. For example: Column A (Region), Column B (Store), Column C (Sales). Ensure there are no blank cells in the category columns.
  2. Select the Data Range: Click and drag your mouse to highlight the entire data range, including the headers. Labels can differ slightly by version, but generally, you want to select everything from the top-left header to the bottom-right value.
  3. Insert the Chart: Go to the Insert tab on the top ribbon. In the Charts group, look for the Hierarchy Chart icon (it looks like a small set of nested squares). Click the dropdown arrow and select Treemap.
  4. Verify the Layout: Excel will automatically generate the treemap. The largest rectangles represent the highest values, and the colors typically distinguish the primary categories.
  5. Add or Edit Chart Titles: Click on the default "Chart Title" text box to type a descriptive name for your visualization.
  6. Format the Data Labels: Right-click on any of the rectangles in the chart and select Format Data Series. In the side pane that appears, you can adjust the "Label Options" to change how the category names and values are displayed.
  7. Adjust Colors: To change the color scheme, go to the Chart Design tab (which appears when the chart is selected) and click Change Colors to pick a palette that fits your report.

Common Mistakes

  • Including Non-Numerical Data in Value Columns: Treemaps require a number to determine the size of the rectangle. If your value column contains text or errors, the chart will not render correctly.
  • Using Too Many Categories: If you have hundreds of unique sub-categories, the rectangles become too small to see or label, turning the chart into a "mosaic" that is impossible to read.
  • Incorrect Data Order: If you put the numerical value in the first column, Excel will treat the numbers as category labels rather than sizes. Always place the hierarchy from broadest to narrowest, ending with the value.
  • Empty Rows: Leaving blank rows between your data entries can cause Excel to split the chart into multiple fragmented sections or fail to recognize the data range.

Tips

  • Use a Table: Convert your data range into an official Excel Table (Ctrl + T) before creating the chart. This ensures that if you add new rows of data later, the treemap will update automatically.
  • Limit Hierarchy Depth: While Excel supports multiple levels, treemaps are most effective with two or three levels of hierarchy. Beyond that, the visual clutter reduces the chart's utility.
  • Contrast Colors: Use the "Change Colors" menu to select high-contrast palettes if you are presenting the chart on a projector or in a printed document.
  • Combine with Slicers: If your data is in a table, you can add a Slicer to filter the categories, which will dynamically resize the treemap rectangles based on the filtered view.

Troubleshooting

If the chart does not look as expected, try these steps in order:

  1. Check for Negative Numbers: Treemaps cannot display negative values because a rectangle cannot have a "negative area." If your data contains negatives, the chart will either show an error or omit those data points. Use absolute values or filter out negatives.
  2. Verify Data Types: Ensure the value column is formatted as "Number" or "Currency" and not as "Text." You can check this in the Home tab under the Number format dropdown.
  3. Simplify the Range: If the chart is blank, try selecting only two columns (Category and Value) to see if a basic version works. If it does, the issue likely lies in the complexity or formatting of your sub-category columns.
  4. Update Excel: If the "Hierarchy Chart" option is missing from the Insert tab, ensure you are using a version of Excel that supports it (2016 or later). Older versions (like 2010 or 2013) do not have native treemap support.

Frequently Asked Questions

Can I change the size of individual rectangles manually?

No. The size of the rectangles is strictly determined by the numerical values in your data. To change the size, you must change the underlying data in your spreadsheet.

Why are some of my labels missing from the chart?

Excel hides labels if the rectangle is too small to fit the text. To fix this, you can either expand the size of the entire chart area or reduce the number of categories being displayed.

Can I use a treemap for time-series data?

Treemaps are not designed for time-series data (like monthly sales trends). Use a Line or Column chart for trends; use a Treemap for comparing proportions within a snapshot of time.

How do I group multiple sub-categories together?

Grouping is handled by the column structure. Any items in the first column that share the same name will be grouped into the same primary rectangle, with their corresponding sub-categories nested inside.

Does the treemap work in Excel for the Web?

Yes, you can view and edit treemaps in Excel for the Web, though some advanced formatting options available in the desktop application may be limited.