Summing rows where adjacent cell is the same

rlamb

New member
Joined
Jan 16, 2013
Messages
2
Reaction score
0
Points
0
I have a question which on the face of it seems very simple but have not found a solution whilst searching this and many other forums.
I am using Excel 2010 and have a list of customer numbers with associated revenue. In this list the same customer number will appear repeatedly for each sale. In reality the list is over 2000 lines long with a possibility of 300 different customers.
CUSTOMER NUMBER #
SALE $
11111
10
22222
20
55222
32
11111
20
62626
43
11111
11
22222
30

What I want is an output than sums the total per customer number, but cannot reference the customer number in any formulae as I will not know it in advance.
The output should look like this

CUSTOMER NUMBER
TOTAL SALES PER CUSTOMER
11111
41
22222
50
55222
32
62626
43

I have tried with a formulae that says something like =SUMIF(A1:A2000,"criteria",B1:B2000) where criteria = 11111, however what I want is a similar formulae that dynamically subtotals all the sales per customer without me having to know in advance the customer number. I want the formulae to learn the criteria from the given data.

Any help is appreciated.
 

CheshireCat

New member
Joined
Dec 30, 2011
Messages
121
Reaction score
0
Points
0
Location
Victoria, Canada
Excel Version(s)
Microsoft Excel 2013
You'll need two formulas for this. Note that the Customer IDs must be text (use an apostrophe if needed).
 

Attachments

  • List Unique Entries.xls
    14.5 KB · Views: 12

rlamb

New member
Joined
Jan 16, 2013
Messages
2
Reaction score
0
Points
0
Wow that was quick and yes these two formulaes look like they will work.
The customer numbers are indeed text as extracted.
Thanks again CheshireCat.
 
Top