Excel Treemap: How to Create and Use It
In this article
Excel treemaps visually represent hierarchical data through nested rectangles, where size and color show value and category relationships. This is ideal for spotting patterns in sales, budgets, or inventory without scrolling through long tables. Before you begin, ensure your data is structured with at least three columns: Category, Subcategory, and Value. Missing or inconsistent labels will break the treemap.
What You'll Need
- Microsoft Excel 2016 or later (Windows or Mac)
- A dataset with hierarchical structure: at least one parent category, one child subcategory, and a numeric value
- No blank rows or columns within your data range
- Numbers formatted as numeric values, not text
Step-by-Step
- Organize your data in three columns: Column A for the top-level category (e.g., Region), Column B for the subcategory (e.g., City), and Column C for the numeric value (e.g., Sales). Ensure every row has data—no empty cells in these columns.
- Select the entire data range, including headers. Click and drag from the top-left cell to the bottom-right cell of your dataset. Do not select extra columns or rows outside your data.
- Go to the Insert tab on the Excel ribbon. In the Charts group, click the Insert Hierarchy Chart button (it looks like a nested rectangle icon).
- From the dropdown menu, select Treemap. Excel will generate a basic treemap using your selected data. If the button is missing, your Excel version may not support it—use Excel 2016 or newer.
- Wait for Excel to build the chart. Rectangles will appear sized proportionally to their values. Larger rectangles mean higher values. Colors typically group by the top-level category (e.g., all regions share one hue).
- Click the chart to activate Chart Tools. Go to the Design tab and choose a preset style from the Chart Styles gallery. Use a high-contrast style if printing or presenting.
- Right-click any rectangle and select Format Data Point. Here you can adjust color schemes, font sizes for labels, and whether to show value labels inside or outside the rectangles.
- To change what the color represents, click the Chart Elements button (the + icon next to the chart), then click the arrow next to Color Saturation. Choose whether to color by Category (top level) or Series (sublevel).
- If your data has more than two hierarchy levels (e.g., Region > City > Store), add a fourth column for the third level and reselect your full range. Excel will automatically extend the treemap to include the new level.
- Click the chart, then go to the Format tab. Under Shape Styles, adjust border weight or fill transparency if rectangles are too crowded. Reduce font size under Format Data Labels if labels overlap.
- Save your workbook. Treemaps are dynamic—if you change a value in your source data, the chart updates automatically. Avoid moving or deleting the source data range after creation.
Common Mistakes
- Using text instead of numbers for values: Excel treats "1,000" as text if not formatted as a number. Convert text to numbers using the Error Checking button (green triangle) or multiply by 1.
- Leaving blank cells in the hierarchy columns: Even one empty cell in Category or Subcategory breaks the hierarchy. Fill gaps or delete the row.
- Selecting too many columns: Including unrelated data (like dates or notes) causes Excel to misinterpret the structure. Only select the three required columns.
- Using decimals or negative values: Treemaps only support positive numbers. Negative values will cause errors or be ignored. Adjust your data to absolute values if needed.
- Trying to create a treemap from pivot tables directly: Pivot tables must be converted to regular ranges first. Copy the pivot table, then Paste Values into a new sheet before selecting data.
Tips
- Use 5–15 top-level categories: More than that makes the treemap cluttered. Group smaller categories into an "Other" bucket.
- Sort your data by value descending before inserting the chart: This helps Excel assign the largest rectangles first, improving readability.
- For presentations, hide the chart legend. Right-click it and choose Delete—labels inside rectangles are clearer.
- Use consistent naming: If one category is "North America" and another is "NA", Excel may treat them as separate. Standardize terms.
- Export to PowerPoint: Right-click the chart > Copy > go to PowerPoint > Paste Special > Picture (Enhanced Metafile) to preserve quality.
- Test with dummy data first: Create a small sample (e.g., 3 regions, 2 cities each, 5 values) to confirm your structure works before using real data.
Troubleshooting
- "Treemap option is grayed out": You’re likely using Excel 2013 or older. Upgrade to Excel 2016 or later. Alternatively, your selection includes non-numeric data or blank rows—check your range.
- Rectangles are all the same size: Your Value column contains text or zeros. Select the column, press Ctrl+1, choose Number format, and ensure no decimals are hidden. Use the VALUE() function if needed.
- Labels are unreadable or overlapping: Right-click a label > Format Data Labels > Decrease font size. Or reduce the number of displayed labels by unchecking "Value" under Chart Elements > Data Labels.
- Colors don’t match categories: Click Chart Elements > Color Saturation > choose "Category" instead of "Series." If categories are inconsistently named, standardize them in your source data.
- Chart disappears after editing data: You may have deleted or moved the original data range. Restore the data or recreate the chart from the updated range.
- Excel crashes when creating treemap: Close other apps to free memory. Save your workbook, restart Excel, then reopen. If it persists, try reducing data size or splitting into multiple charts.