# Count visible rows in a filtered list

=SUBTOTAL(3,range)

To count the number of visible rows in a filtered list, you can use the SUBTOTAL function, which *automatically ignores* rows that are hidden by a filter. In the example shown, the formula in cell C2 is:

=SUBTOTAL(3,B5:B14)

The SUBTOTAL function can perform calculations like COUNT, SUM, MAX, MIN, and more. What makes SUBTOTAL especially interesting and useful is that it *automatically ignores items that are not visible in a filtered list or table*. This makes it ideal for showing how many items *are* visible in a list, the subtotal of visible rows, etc.

Following the example in the image above, to count the number of non-blank rows visible when a filter is active, use:

=SUBTOTAL(3,B5:B14)

If you are hiding rows manually (i.e. right-click, Hide), and not using the auto-filter, use this version instead:

=SUBTOTAL(103,B5:B14))

The first argument controls the type of operation SUBTOTAL will perform. For a full list, see the table here.

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

## Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.