#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Total A Range

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???

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Total A Range

Produce a unique list of zip codes on another sheet. To do this,
insert a new sheet, and copy the zip codes from your existing sheet to
column A of the new sheet. If you do not have a header, then insert a
new row 1 and put "zip code" in A1. Then highlight all the data in
column A including the header, click on Data | Filter | Advanced
Filter and select Unique Records Only, Click on Copy to another
location, and enter C1 as the location. Click OK and you will have a
unique list in column C - you can delete columns A and B so that your
unique list is now in column A.

Put "Total" in B1 of this new sheet and this formula in B2:

=SUMIF(Sheet1!A$1:A$3500,A2,Sheet1!B$1:B$3500)

and then just copy this down to cover your unique list.

Hope this helps.

Pete

On Jan 17, 5:24*pm, Hamed parhizkar
wrote:
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???


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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???


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding 'total' in range excel Excel Worksheet Functions 3 March 19th 07 10:34 AM
how to get a total to add up a range andyhofer Excel Worksheet Functions 1 March 27th 06 07:47 PM
finding a range of dates to total Danbmarine Excel Discussion (Misc queries) 4 January 27th 06 09:28 PM
Searching a range of numbers for a specified total saustin Excel Worksheet Functions 2 January 19th 06 03:59 PM
How do I get the total of a range of cells that are in another she alice Excel Discussion (Misc queries) 1 November 24th 05 02:23 PM


All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"