Excel SUBTOTAL function📊 Total of visible rows

The SUBTOTAL function: Total of visible rows. A total that follows the filter. This page shows the syntax, a worked example with its result and how the formula reads.

What does SUBTOTAL do?

Total of visible rows. A total that follows the filter

SUBTOTAL syntax

=SUBTOTAL(function_num, ref1, [ref2], ...)

Arguments in square brackets [ ] are optional · argument names follow Microsoft's documentation

SUBTOTAL example with the result

=********

👑 Ready-to-use example formula for VIP supporters only · Become VIP

Formula in cell B6 Yellow cells = result

AB
1ItemSales
2Coffee120
3Thai tea80
4Snack45
5Water60
6Visible total305

How it reads: 9 = sum (1 = average, 2 = count, 4 = max) · when a filter is on, only visible rows count

Frequently asked questions about SUBTOTAL

What does SUBTOTAL do?

Total of visible rows. A total that follows the filter

What does the SUBTOTAL example return?

The example formula in cell B6 gives 305.

Which Excel versions have SUBTOTAL?

It has been in Excel for many versions and works in the versions in common use today, including Excel for Microsoft 365.

Source: support.microsoft.com

Checked 17 November 2026 · by Black Sheep Barn · example results are calculated by the app's example engine, for learning

🤖
Posting...
Please wait a moment
Social VIP Classroom
Home
Thai Smiles Profile