Sum Range Module for each value

Pete666

Registered User.
Local time
Today, 22:41
Joined
Aug 29, 2006
Messages
28
I have a spreadsheet which contains a list similar to below where I need to find the unique values, and their total in the next column and paste them in another worksheet as per the Output below.

Data
COM 150
COM 150
SPF 100
SPF 100
COM 50

Output
COM 350
SPF 200

These lists may vary in size and order so I need to cover the general area. A message box needs to then appear with each unique value and their total.


Thanks
 
Try =sumif() (look it up in excel help for a complete understanding of it).
 
Unfortunately not that simple.

I'm trying to build this into a module with a loop so I do not need to know the grouped values the module will run through the file, find them all and sum their respective values.
 
Obviously you are going to start with a sort of the data , then just loop through summing till each change of data or EOF(presumably a blank cell).
You can out put a msgbox on each change or better store the result for later examination, printing etc.

Brian
 
A simple way to get the figures without any programming is to sort then use subtotals (click data then subtotals)

Brian
 

Users who are viewing this thread

Back
Top Bottom