ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Data tools
  3. How to Make a Treemap Chart in Excel From Category Totals

How to Make a Treemap Chart in Excel From Category Totals

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

To make a treemap chart in Excel, put category names on the left and positive values on the right, select the range, then choose Insert > Insert Hierarchy Chart > Treemap. Each rectangle's size shows its value. If your data has many rows per category, total each category with SUMIF first. Treemaps need Excel 2016 or later.

Key takeaways

  • A treemap shows parts of a whole as rectangles: the bigger the value, the bigger the rectangle.
  • Insert it from Insert > Insert Hierarchy Chart > Treemap in Excel 2016 or later, including Microsoft 365.
  • Put higher levels on the left (Category, then Product) and one value column on the right.
  • Total raw transactions by category with SUMIF; treemaps can't be made as PivotCharts.
  • Treemaps ignore zero and negative values, so they suit sales, costs and counts, not profit and loss.
On this page+
  1. What a treemap chart shows
  2. Step 1: Arrange the data for a treemap
  3. Step 2: Insert the treemap chart
  4. Step 3: Make the labels and colours readable
  5. Make a treemap from category totals with SUMIF
  6. Can you make a treemap from a PivotTable?
  7. Treemap, pie or bar chart?
  8. Common treemap problems
  9. Practise it

A treemap chart in Excel shows how a total splits into parts, using rectangles whose size matches each value. It handles many categories, and two levels such as Category and Product, far better than a pie chart. This guide shows how to lay out the data, insert the treemap, total raw data by category with SUMIF first, and fix the problems people hit most. Treemaps need Excel 2016 or later, including Microsoft 365, on Windows or Mac.

What a treemap chart shows#

A treemap fills a box with rectangles, one for each item, sized by its value. Items in the same group share a colour and sit together, so you see both the groups and the items inside them at once.

Use a treemap when the question is "what makes up the total?" and there are too many parts for a pie chart. It is less useful for exact comparisons: people judge lengths better than areas. To compare a few values precisely, a bar chart is clearer. The chart basics guide explains how to match the chart to the question.

Step 1: Arrange the data for a treemap#

A treemap needs label columns on the left, from the highest level to the lowest, and one column of numbers on the right. This sales table is ready to chart:

ABC
1CategoryProductSales
2SoftwareCRM42,000
3HardwareLaptops65,000
4SoftwarePayroll18,000
5ServicesTraining12,000
6HardwareMonitors21,000
7SoftwareSecurity27,000
8ServicesSupport30,000

Check three things before you insert the chart:

  • One header row with a short name for each column.
  • Real numbers in the value column. Numbers stored as text are left out of the chart.
  • Positive values only. A treemap can't draw a zero or negative rectangle, so it skips those rows.

The rows don't need to be sorted or grouped. Excel groups them by the Category column and arranges the rectangles by size.

Step 2: Insert the treemap chart#

With the data in place, the chart takes three clicks:

  1. Select A1:C8, headers included.
  2. Go to Insert > Insert Hierarchy Chart (the icon with coloured rectangles) and choose Treemap. On a Mac, the same icon is on the Insert tab.
  3. Drag the chart to where you want it and resize it.

You can also reach it through Insert > Recommended Charts > All Charts > Treemap. If you only select one label column and the values, you get a one-level treemap with no groups.

On this data, Hardware (86,000), Software (87,000) and Services (42,000) each get a colour, and Laptops is the single largest rectangle.

Step 3: Make the labels and colours readable#

The default treemap often needs clearer labels. Right-click a rectangle and choose Format Data Series, then look under Series Options:

  • Label Options sets how the group names appear: Banner puts each category name in a strip across the top of its group, Overlapping prints it over the rectangles, and None hides it.
  • To show values, click the chart, choose the + button (Chart Elements) or Chart Design > Add Chart Element > Data Labels, then in Format Data Labels tick Value as well as Category Name.
  • Change the colour set from Chart Design > Change Colors.

Give the chart a title that states the point, such as "Software and Hardware make up 80% of sales", not just "Sales". (87,000 + 86,000 is 173,000 of 215,000, about 80%.)

Make a treemap from category totals with SUMIF#

When your data has one row per sale, total each category first and chart the totals. SUMIF adds the values in rows that match one condition:

Excel formula
=SUMIF(A2:A8,"Software",C2:C8)

The result is 87,000 (42,000 + 18,000 + 27,000). For a full summary, list each category once in E2:E4 and in F2 type:

Excel formula
=SUMIF($A$2:$A$8,E2,$C$2:$C$8)

Fill it down. The $ signs keep the data ranges fixed while E2 changes to E3 and E4. You get Software 87,000, Hardware 86,000 and Services 42,000, and a treemap of E1:F4 updates whenever the raw data changes. The guide to summing by category covers this pattern in more depth, and the SUMIF function guide has the syntax.

In Excel 2021 or Microsoft 365, =UNIQUE(A2:A8) lists each category once for you, so new categories appear by themselves.

Can you make a treemap from a PivotTable?#

Not directly: treemaps, like some other newer chart types, aren't available as PivotCharts. You have two good options:

  1. Use a SUMIF summary, as above. It stays live when the data changes.
  2. Copy the PivotTable and paste it as values (Windows: Ctrl+Alt+V; Mac: ⌘+Control+V, then choose Values), and build the treemap from the pasted range. You'll need to repeat this when the data changes.

A PivotTable is still the fastest way to see the totals. The guide to PivotCharts lists the chart types that do work straight from a PivotTable, such as column, bar and pie.

Treemap, pie or bar chart?#

Pick the chart by the number of parts and the question you're answering:

SituationBest chart
2 to 5 parts of one totalPie chart
Many parts, or two levels (category and product)Treemap
Exact comparison between items, or values over timeBar or column chart
Several levels, where the hierarchy itself mattersSunburst chart

A pie chart with ten slices is hard to read; a treemap with ten rectangles is not. The guide to pie charts and when not to use them goes into the trade-offs.

Common treemap problems#

Most treemap problems come from the data, not the chart:

  1. Treemap is missing from the Insert menu. You're on Excel 2013 or earlier. Use a bar chart instead.
  2. A category is missing. Its value is zero, negative, blank or text. Treemaps only draw positive numbers.
  3. The chart shows one colour. You selected only one label column. Include the higher-level column, such as Category, on the left.
  4. Lots of tiny unreadable rectangles. Group small items into an "Other" row with SUMIF before charting.
  5. Totals don't match the data. The SUMIF ranges are different sizes, or the category names have extra spaces. Clean names with TRIM.

Practise it#

A treemap is only as good as the totals behind it. Practise SUMIF in a live spreadsheet to total any column by category, then practise PivotTables to summarise data fast before you chart it. Each lesson checks your work instantly, and the exercise on this page builds the first category total.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Before charting, total the sales for each category. In F2, use SUMIF to add up the Sales (C2:C8) for the Software category (A2:A8).

fx
ABCDEFG
1
Category
Product
Sales
2
Software
CRM
42000
Software total
3
Hardware
Laptops
65000
4
Software
Payroll
18000
5
Services
Training
12000
6
Hardware
Monitors
21000
7
Software
Security
27000
8
Services
Support
30000
9
10
11

Tip: SUMIF takes the range to check (A2:A8), the condition ("Software") and the range to add (C2:C8).

Practise this in a lesson

LessonSUMIFAdd up only the numbers that meet a condition, with and without a separate sum range.LessonPivot tables 1Build your first PivotTable on a new sheet: total sales by region, split them by product, then switch the summary from Sum to Count and Average and read the answer off the pivot.Function guideSUMIFAdd up values that meet one condition with SUMIF. Totals by category, person or amount, the argument-order trap, and a live exercise.

Frequently asked questions

Which version of Excel has treemap charts?

+

Treemap charts are in Excel 2016 and later on Windows and Mac, including Excel 2019, Excel 2021, Excel 2024 and Microsoft 365. Excel 2013 and earlier don't have them.

Can I make a treemap from a PivotTable?

+

Not directly, because treemaps aren't available as PivotCharts. Build a summary with SUMIF and chart that, or copy the PivotTable and paste it as values, then insert the treemap from the pasted range.

Why is my treemap missing some categories?

+

Treemaps only draw positive values. Zero, negative and blank values have no rectangle. Numbers stored as text are also left out, so convert them to real numbers first.

What is the difference between a treemap and a sunburst chart?

+

Both show a hierarchy. A treemap uses nested rectangles and makes sizes easy to compare at the lowest level. A sunburst uses rings and makes the levels of the hierarchy easier to see.

When should I use a treemap instead of a pie chart?

+

Use a treemap when you have many categories or two levels, such as category and product. A pie chart only works well with a few slices and one level.

Sources

  • Create a chart from start to finish - Microsoft Support
  • SUMIF function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What a treemap chart shows
  2. Step 1: Arrange the data for a treemap
  3. Step 2: Insert the treemap chart
  4. Step 3: Make the labels and colours readable
  5. Make a treemap from category totals with SUMIF
  6. Can you make a treemap from a PivotTable?
  7. Treemap, pie or bar chart?
  8. Common treemap problems
  9. Practise it

Keep reading

Data tools· 5 min read

Make a Chart in Excel: Column, Bar, Line and Pie

To make a chart in Excel, select your data including the headers, go to Insert and pick a chart, or click Recommended Charts to let Excel suggest one. Use a column or bar chart to compare categories, a line chart for a trend over time, and a pie chart only for a few parts of one whole.

Conditional math· 6 min read

How to Sum by Category in Excel

To sum by category in Excel, list each category once, then use SUMIF next to it: =SUMIF($A$2:$A$8,D2,$B$2:$B$8) adds the amounts in column B for the category named in D2. Fill it down for a full summary. In Excel 2021 or Microsoft 365, =UNIQUE(A2:A8) builds the category list for you, and a PivotTable does the same job without formulas.

Data tools· 6 min read

How to Make a Pie Chart in Excel (and When Not To)

To make a pie chart in Excel, put category names in one column and their values in the next, select both, then choose Insert > Pie Chart > 2-D Pie. Add data labels and tick Percentage to show each slice's share. Use a pie only for a few parts of one whole; otherwise use a bar chart.

More on data tools

  • Make a Waterfall Chart in Excel to Explain a Change
  • How to Shade Alternate Row Colors in Excel
  • Excel Area Chart: When to Use One and How to Build It
  • How to Make a Bar Chart in Excel
  • Make a Box and Whisker Plot in Excel
  • How to Make a Bubble Chart in Excel With Three Measures
All data tools articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free