To create a tree map in Excel, select your data range, go to the Insert tab, click the Insert Hierarchy Chart icon in the Charts group, and select Treemap. A tree map is a powerful visualization tool that uses nested rectangles to represent hierarchical data, where the size of each rectangle corresponds to a quantitative value and the color often represents a category. This allows you to see patterns, proportions, and outliers across different levels of a data set at a single glance.

What You'll Need

  • Microsoft Excel (2016 or newer, as Treemaps were introduced in the 2016 version).
  • A structured data set organized in a hierarchy (e.g., Category, Sub-category, and Value).
  • Numeric data for the size of the rectangles; text data for the labels.

Step-by-Step

  1. Organize Your Data: Before inserting the chart, your data must be arranged in a specific hierarchical format. Create columns from broadest category to most specific. For example, if you are tracking sales, Column A should be the "Region" (North, South), Column B should be the "Store" (Store 1, Store 2), and Column C should be the "Sales Amount" (numeric values). Ensure there are no empty rows or columns within the data range, as this can confuse the chart engine.
  2. Select the Data Range: Click and drag your mouse to highlight all the cells containing your hierarchical labels and the corresponding values. Include the header row (e.g., Region, Store, Sales) so that Excel can automatically label the legend or series if applicable.
  3. Access the Chart Menu: Navigate to the Insert tab on the top Ribbon. In the Charts group, look for the icon that looks like a small organizational chart or a set of nested squares. This is the Insert Hierarchy Chart button. Note that labels may differ slightly depending on your version of Excel or your region's language settings.
  4. Insert the Treemap: Click the Insert Hierarchy Chart icon and select Treemap from the dropdown menu. Excel will instantly generate the chart on your worksheet. The largest rectangles represent the largest values, and they are grouped by their parent categories.
  5. Format the Chart Layout: Once the chart appears, you can click on the chart area to reveal the Chart Design and Format tabs in the Ribbon. Use the Add Chart Element menu to add a chart title. Click the title box to rename it to something descriptive, such as "Annual Sales by Region and Store."
  6. Customize Colors: To change the appearance, go to the Chart Design tab and select Change Colors. You can choose from various monochromatic or colorful palettes. This is particularly useful for distinguishing between high-level categories.
  7. Adjust Data Labels: If the labels are too small or missing, right-click on one of the rectangles and select Format Data Series. In the side pane that opens, you can adjust the label options. Ensure that the labels are set to show the category names. If you have very small data points, Excel may hide the labels to avoid overlap; you can resolve this by expanding the size of the chart area.
  8. Fine-Tune the Hierarchy: If the rectangles are not grouping as expected, double-check your data source. The Treemap relies strictly on the order of columns. The leftmost column is always the top level of the hierarchy. If you want to change the grouping, you must rearrange the columns in your spreadsheet and then re-insert the chart.

Common Mistakes

One of the most frequent errors is attempting to create a Treemap using non-numeric data for the value column. A Treemap requires a quantitative measure to determine the area of the rectangles; if you select only text, Excel will be unable to render the chart. Another common mistake is including "Total" rows at the bottom of the data set. If you include a sum of all sales in your selection, the "Total" rectangle will be so large that it dwarfs all other categories, making the rest of the chart unreadable. Always exclude summary rows from your selection.

Users also often struggle with "flat" data. A Treemap is designed for hierarchies. If you only have one category and one value, a simple bar chart is more effective. Using a Treemap for data that doesn't have a logical parent-child relationship results in a confusing visual that lacks the analytical value of a true hierarchy chart. Finally, avoid using too many levels of hierarchy. While Excel can handle multiple levels, having five or six levels often leads to tiny, unreadable rectangles that clutter the screen.

Tips

To make your Treemap more professional, use the Format tab to remove the chart border or background fill, allowing the chart to blend seamlessly into your dashboard or report. If you are presenting this data in a slide deck, consider using a high-contrast color palette to make the primary categories pop.

For better readability, sort your source data in descending order based on the value column before creating the chart. While Excel handles the sizing automatically, starting with sorted data can sometimes help in organizing the visual flow of the rectangles. Additionally, if you have a few extremely large values and many tiny ones, consider grouping the tiny values into an "Other" category in your data table first. This prevents the chart from having dozens of microscopic slivers that provide no visual insight.

Troubleshooting

If the Treemap does not appear or displays an error, first check that your data contains no errors like #VALUE! or #DIV/0!. These errors prevent Excel from calculating the area of the rectangles. If the chart is blank, ensure that the value column contains actual numbers and not numbers stored as text. You can tell if numbers are stored as text if there is a small green triangle in the corner of the cell; select the cells and click the warning icon to Convert to Number.

If the categories are not grouping correctly, check for spelling inconsistencies. For example, if one row says "North Region" and another says "North," Excel will treat these as two separate parent categories. Use the Find and Replace tool (Ctrl+H) to standardize your category names. If the chart is lagging or freezing, it may be because you have selected thousands of rows of data. Treemaps are best for summarized data; try using a Pivot Table to summarize your raw data first, then create the Treemap from the Pivot Table results.

Frequently Asked Questions

Can I add a legend to a Treemap?

Unlike bar or pie charts, Treemaps do not typically use a traditional legend because the labels are placed directly inside the rectangles. The colors are used to group the categories, and the labels provide the identity of each block.

How do I change the size of the rectangles?

You cannot manually drag the edges of the rectangles to change their size. The size is strictly determined by the numeric values in your data range. To change the size, you must edit the numbers in your spreadsheet.

Does Excel support 3D Treemaps?

No, Excel only supports 2D Treemaps. 3D versions of this chart type are not available as they generally distort the perception of area, which defeats the purpose of the visualization.

Can I use a Treemap for negative values?

No, Treemaps cannot display negative values because a rectangle cannot have a negative area. If your data contains negative numbers, you should use a different chart type, such as a Waterfall chart or a Clustered Bar chart.

How do I handle data with too many small categories?

The best approach is to create a "Miscellaneous" or "Other" category in your data table. Sum all values below a certain threshold into this single category to keep the visual clean and readable.