View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Sumproduct Column B based on Column A

Hi,

Enter a list of all the unique cities starting in cell D1 and then use

=COUNTIF(B$1:B$100,D1)

Copy down as far as needed.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Gary" wrote:

I'm trying to count the number of sales reps in each city. I have two
columns. Column A is the City. Column B is the number of sales reps in a
city. Sometimes a city is listed more than once and each city can have
multiple sales reps as follows:
Col A Col B
City Reps
City 1 3
City 1 1

City 2 4

City 3 1
City 3 6

I want to add the number of reps in each city, being able to use any city
name, rather than "City 1", "City 2", etc. In other words, I may have 50
cities and need to count the reps in all the cities. As the sales force
grows, I am constantly adding new cities, so I need the flexibility to count
reps in an unlimited number of cities.