Count visible rows with criteria in Excel
It is easy to count only visible rows in a filtered list with the SUBTOTAL function. However, if you want to count visible rows with criteria, the SUBTOTAL function cannot help to achieve. You need to apply a formula based on the SUMPRODUCT, SUBTOTAL and OFFSET functions. This tutorial provides detailed steps to help you get through it.
How to count visible rows with criteria in Excel?
The below product table has been filtered by Shop A, to count only the visible Laptop in the Product column, you need to apply the below formula.
Range: The range you will count only visible rows.
Criteria: The criteria you will count visible rows based on.
Vals.firstcell: The first cell of the range.
How to use these formulas?
1. Select a blank cell to output the result.
2. Enter the below formula into it and press the Enter key. Then the result is displayed in the selected cell.
1) In the formula, D3:D15 is the range contains the visible rows to count, C18 contains the criteria you will count visible rows based on, and D3 is the first cell of the range. You can change them based on your own data.
2) If you did not enter the criteria in a cell in advance, you can directly enter it in the formula and enclose it in double quotes as follows.
Excel SUMPRODUCT function
The Excel SUMPRODUCT function can be used to multiply two or more columns or arrays together, and then get the sum of products.
Excel SUBTOTAL function
The Excel SUBTOTAL function returns a subtotal in a list or database
Excel ROW function
The Excel ROW function returns the row number of a reference.
Excel MIN function
The Excel MIN function Returns the smallest number in a set of values.
The Best Office Productivity Tools
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Please leave your comments in English