ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pivot Table- how do I eliminate duplicates in count of name (https://www.excelbanter.com/excel-discussion-misc-queries/65392-pivot-table-how-do-i-eliminate-duplicates-count-name.html)

Isabelga

Pivot Table- how do I eliminate duplicates in count of name
 
I have built a pivot table from a table containing a list of people.
My pivot table will count people based on the field Name.
Some people names might have several entries in the table but in this case,
I want the name to be counted a 1.
What is the appropriate set up for this ?
Thankk you for your help.

Jonathan Cooper

Pivot Table- how do I eliminate duplicates in count of name
 
Insert a helper column into your table, so that it is part of your pivot
table.

This formula may be confusing but I'll try to explain. Assuming your names
are in column A, starting with row 2.

A1 is blank
A2=Eric
A3=George
A3=George

Put this formula into B2. =IF(COUNTIF($A$2:$A2,A2)1,0,1)
and they copy/paste it down.

As you paste it down, the range grows. In cell A3 for example, it counts
how many times it finds 'George' in the list from $A$2:$A3. The answer is 1.
Then the IF kicks in. Since there was only one 'George', which is not 1,
it evaluates to a 1. Then in B3, the countif will result in a 2, which IS
greater than 1, so the answer is zero.

Still confusing, but it will work. Then do a SUM of this column in your
pivot table.



"Isabelga" wrote:

I have built a pivot table from a table containing a list of people.
My pivot table will count people based on the field Name.
Some people names might have several entries in the table but in this case,
I want the name to be counted a 1.
What is the appropriate set up for this ?
Thankk you for your help.



All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com