If you’ve ever worked with stock, inventory, or transaction logs, you know how cluttered reports can get when many items have a net total of zero. These rows add no value but still appear everywhere.
In this guide, you’ll learn how to remove items with zero total in Excel and Google Sheets using a single, modern formula. It works on any report—whether totals are calculated manually or generated using Excel’s Data → Outline → Subtotal feature.
By the end, you’ll be able to clean up your reports automatically, without filters, VBA, or Apps Script, and without repetitive manual work.
Why Remove Items with Zero Total (Net Zero)?
Imagine you have a long material-movement report. Some products have been fully used, sold out, or reconciled to zero—but they still appear in your final summary.
This causes several issues:
- Cluttered reports
- Misleading totals
- Wasted time manually hiding zero-balance items
- Extra ink and paper when printing
Manually removing these rows becomes frustrating, especially when your dataset updates frequently.
This tutorial introduces a simple, dynamic formula that lets Excel and Google Sheets automatically clean up your reports for you.
Understanding the Core Idea
Excel and Google Sheets make it easy to calculate net totals—especially if your OUT quantities are represented as negative values.
Example data (sorted by Item → Date):

You can already calculate net balances using Pivot Tables (common), GROUPBY (Excel), Power Query (Excel), QUERY (Google Sheets), and similar tools.
To filter out zero-total items more flexibly, use these methods:
GROUPBY + FILTER method in Excel:
=LET( summary, GROUPBY(B2:B12, D2:D12, SUM, 0, 0), FILTER(summary, CHOOSECOLS(summary, 2)) ) QUERY + FILTER method in Google Sheets:
=LET( summary, QUERY(HSTACK(B2:B12, D2:D12), "SELECT Col1, SUM(Col2) GROUP BY Col1 LABEL SUM(Col2)''", 0), FILTER(summary, CHOOSECOLS(summary, 2)) ) Where:
B2:B12→ row field (items to group)D2:D12→ values field (quantities to aggregate)
Output example:
| Item | Total |
|---|---|
| Gravel 0–5 mm | 260 |
| Roadbase | 40 |
Items with a total of 0 (like Sand) disappear automatically.
But what if you want the full breakdown, not just a summary? That’s where the next step comes in…
Step 1: Insert Subtotals Automatically
Note: This step applies to Excel only.
If you prefer a breakup similar to traditional reports, you can insert subtotals first.
How to Insert Subtotals
- Select A1:D12.
- Go to Data → Outline → Subtotal.
- If the option is greyed out, your data is in a structured table.
- Right-click any cell → Table → Convert to Range.
- Use these settings:
- At each change in: Item
- Use function: Sum
- Add subtotal to: Qty in MT
- Summary below data: ✔️

Excel will generate totals like:

Perfect — now your data is properly grouped.
Next, we’ll remove any item whose total equals zero.
Note: In Google Sheets, you’ll need to create a similar grouping manually before applying the formula.
Step 2: Formula to Remove Items with Zero Total (Net Zero)
Use this modern Excel formula (Excel 365 / 2021 / 2024):
=LET( range, A2:D16, header, A1:D1, label_col, B2:B16, total_col, D2:D16, grouping, XLOOKUP( ROW(label_col), IF(ISNUMBER(SEARCH("Total", label_col)), ROW(label_col), NA()), ROW(label_col), "", 1, 1 ), group_total, XLOOKUP(grouping, ROW(label_col), total_col), ftr, FILTER( IF(ISBLANK(range), "", range), (group_total) * (total_col) ), IFERROR(VSTACK(header, ftr), "No Records to Display") ) If you are using Google Sheets, wrap the formula with ARRAYFORMULA(), e.g.:
=ARRAYFORMULA(LET(...)) What Each Parameter Refers To:
| Name | Meaning |
|---|---|
A2:D16 | Subtotal range |
A1:D1 | Header row |
B2:B16 | Column with “Total” labels |
D2:D16 | Column with totals |
Output (Excel)
The formula returns a cleaned report that excludes zero-total items:

Sand disappears because its total is 0.
Note: Dates may appear as serial numbers instead of actual dates. In Excel, apply Short Date formatting from Home → Number. In Google Sheets, use Format → Number → Date.
Does This Work for Manual Subtotals?
Absolutely.
As long as your totals include the word “Total”, this formula identifies and filters them.
Additional Features Built Into This Formula
- Removes entire item groups with net zero total
- Removes rows where values are blank or zero
- Preserves headers
- Works with any dataset size
- No need for helper columns
How the Formula Removes Items with Zero Totals (Formula Explanation)
The formula may look long, but LET makes it easier to read, maintain, and faster to calculate.
With LET, we can assign meaningful names to ranges and intermediate results.
Here are the key variables and how each one helps filter out groups whose net total is 0:
- range → A2:D16
- header → A1:D1
- label_col → B2:B16
- total_col → D2:D16
These refer to the full data range, the header, the grouping column, and the value (quantity) column.
1. Grouping (grouping)
XLOOKUP( ROW(label_col), IF(ISNUMBER(SEARCH("Total", label_col)), ROW(label_col), NA()), ROW(label_col), "", 1, 1 ) This assigns a common ID to all rows belonging to the same group.
It works by finding the row number of each group’s “Total” label and applying that row number to all items under that group.
2. Assigning Group Total (group_total)
XLOOKUP(grouping, ROW(label_col), total_col) This assigns the group’s net total to every row in the group.
3. Filtering Logic (ftr)
FILTER( IF(ISBLANK(range), "", range), (group_total) * (total_col) ) This removes any group where:
- the group total is 0, and
- the total column value is 0,
because multiplying them produces 0, and those rows are excluded by FILTER.
4. Final Output Formatting
IFERROR(VSTACK(header, ftr), "No Records to Display") This adds the header row back to the filtered result.
If all groups have zero totals (so no rows match), it returns a clean custom message instead of an error.
This is how the formula effectively removes all items whose group total is zero.
FAQs
1. Does this require a Table?
No. In fact, Subtotal doesn’t work on Tables — convert to range first.
2. Will it work if totals are typed manually?
Yes — as long as the item total row contains the word “Total”.
3. Can I adapt this for other columns?
Yes — just update the ranges in the formula.
Conclusion
Removing items with zero totals in Excel and Google Sheets doesn’t require filters, VBA, Apps Script, or manual cleanup. With the modern formula in this guide, you can:
- Automatically detect net totals
- Instantly remove zero-balance items
- Keep your reports clean and accurate
This method works for inventory reports, material-movement logs, transaction entries, and any other grouped dataset.



















