View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Midjack Midjack is offline
external usenet poster
 
Posts: 15
Default Count names and occurrences

Thanks Gaurav. That kinda works if I sort the city, state first, but I have a
list of several thousand cities, and I was hoping that I could wind up with
one line per city with a total on the same line.

"Gaurav" wrote:

in C2, type =COUNTIF(A:A,A1) and copy down.

is this what you want?

I am just wondering that when you copy the furmula down and a city is
repeated in column A, the number will also be repeated in column C. Would
you be ok with that?

"Midjack" wrote in message
...
I have a long list of cities (Col. A) and states (Col. B). I would like to
count the number of times each city occurs without having to input the
city
name each time; with the results appearing like this:

Col. A Col. B Col. C
City State Number of occurrences

Boston Massachusetts 300
Denver Colorado 250
New Orleans Louisiana 256
etc.

Anyone know how to do this?

Thanks