Thread: Total A Range
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Total A Range

Assuming your data starts in Row 2 (zip codes in Column A, product count in
Column B), put this...

=IF(OR(COUNTIF($A$2:A2,A2)1,B2=""),"",SUMIF(A:A,A 2,B:B))

in Row 2 of an unused column and then copy it down for as many cells as you
want (even past your last piece of data)... it will show the total of a
particular zip code next to the first occurrence of that zip code in you
list.

Rick


"Hamed parhizkar" wrote in
message ...
I have a list of over 3000 people that bought products in different zip
codes.

The spreadsheet is set up like below:

30044 1
30044 1
30125 1
11253 1

Th first numbers are the zip code and in the cell next to it, the number 1
represents a boought product in that zip code. Being that I have a list of
over 3000, how can I make a function that will total up how many products
were sold in each zip code???