View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Counting strings in excel with Pivot

Pivot should get you your desired result. Put Users in the "row" area and
Count of Users in "data" area.

For example:

Users
Trevor
Dave
Tony
Dave
James
James
Tony
Dave
George
James
Tony
Nigel
Trevor
Tony
Nigel
Nigel
Trevor
Trevor
James
James
Nigel
Nigel
George
Trevor
Dave
James
Dave
Trevor
Dave
Trevor


will produce the following:

Count of Users
Users Total
Dave 6
George 2
James 6
Nigel 5
Tony 4
Trevor 7
Grand Total 30

--
Gary''s Student


"navin" wrote:

Hi,

i have this sheet which contains user information. User name in the
sheets are repeated. I have used pivot tables to display this data.
However, I also want a column which shows the total number of users.
Currently, when I select "Count of user name" in the pivot, it counts
all the existing user names but i want it to display only distinct user

name (i.e), it should not count the repeated the username.

For Example:

Row: A
Mike
Mike
Mike
Mike
Mike
Mike
navin
navin
navin
navin
navin

For the above row i want Pivot to calculate and show total# of mike and
total# of navin

Please help.


Regards,
Navin