Pivot Table vs. Subtotals

  • Thread starter Thread starter Kirby
  • Start date Start date
K

Kirby

At one time I knew enough about both of these subjects to
be successful. Unfortunately, that was 4 years ago.
Time flies when your raising children.

I have a database that I want to receive some counts
from. How many users (column D) for each Company (column
A). Seems simple... I receive a count of all users, not
each individuals name.

Column A Column D
ABC Jim
ABC Jim
ABC Alice
ABC Fred
ABC Fred
XYZ Mary
XYZ Mary
XYZ Mary
XYZ Tim

Count I want to receive is 3 users for ABC and 2 users
for XYZ, not 5 users for ABC and 4 users for XYZ.

Thanks!!
 
A pivot table won't calculate a unique count. However, you could add a
column to the database, then add that field to the pivottable.

For example, if you want to count the items in column D, use the
following formula in row 2:
=IF(COUNTIF(D$2:D2,D2)=1,1,0)

Copy this formula down to all rows in the database.

Add this field to the pivot table data area, and you'll get a count of
unique items.
 
Back
Top