View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_8_] Roger Govier[_8_] is offline
external usenet poster
 
Posts: 376
Default count values in a column, but. . .

Hi

Assuming your source data is in columns A and B of Sheet1 and your
results are on Sheet2, with Town 1 in A2
Try
=IF($A2="","",COUNTIF(Sheet1!$B:$B,$A2))
Copy down as required.
--
Regards
Roger Govier

tree wrote:
First, apologies: My question must be answered in this and countless other
forums, but I can scarcely even begin to 'formulate' my question in search
syntax. So here goes.

I have a table with the columns Name (of people) and Town. (There are other
columns, but these are the two I'm concerned with.) I want to count the
number of people there are for each Town, but count each person only once.

For instance -

NAME TOWN
person1 town1
person1 town1
person2 town1
person3 town2
person3 town2
person4 town3


The results I'm looking for would be -

TOWN COUNT (of individual people)
town1 2
town2 1
town3 1

Thanks.