How can I get the number of rows in an Excel pivot table for use outside the pivot table?
16,507
You can use a regular Count(), Counta() or Countif() functions.
B1 =COUNTA(B4:B2000)
B2 =COUNTIF(C4:C2000,4)
Related videos on Youtube
Author by
Kendall Lister
Updated on September 18, 2022Comments
-
Kendall Lister over 1 year
I have a pivot table in Excel of the form:
Country Server Status Australia AU1 1 AU2 1 AU3 4 New Zealand NZ1 4 NZ2 1 Germany DE1 1 DE2 4 DE3 1
I would like to add some summary information above the table showing the number of rows and the number of rows that match certain criteria, e.g.:
Number of servers: 8 Servers with status 4: 3
How can I count the rows in the pivot table, either in total or matching criteria? I have researched using the GETPIVOTDATA function but not found a solution (see https://support.office.com/en-us/article/GETPIVOTDATA-function-8c083b99-a922-4ca0-af5e-3af55960761f).
-
Kendall Lister over 7 yearsGah, can't believe I overlooked the simplest approach! Thanks ;)
-
teylyn over 7 years@KendallLister Oh, but the relief when you realize that it's not complicated, after all!