How can I get the number of rows in an Excel pivot table for use outside the pivot table?

1

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

Posted 2017-01-09T01:21:15.617

Reputation: 253

Answers

3

You can use a regular Count(), Counta() or Countif() functions.

enter image description here

B1 =COUNTA(B4:B2000)
B2 =COUNTIF(C4:C2000,4)

teylyn

Posted 2017-01-09T01:21:15.617

Reputation: 19 551

Gah, can't believe I overlooked the simplest approach! Thanks ;) – Kendall Lister – 2017-01-17T03:55:40.360

1@KendallLister Oh, but the relief when you realize that it's not complicated, after all! – teylyn – 2017-01-17T04:11:00.160