excel unique value sum

xiaoyunwu
xiaoyunwu used Ask the Experts™
on
I have sheet 1
product_id, user_id, price
1, u1, 10
2, u2, 20
3, u1, 20
4, u2, 30

I'd like to have unique user_id and sum of price in another sheet automatically filled in. like:
user_id, price
u1, 30
u2, 50

How do I do that? Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
You could also use a pivot table.

Which version of Excel are you using?
Top Expert 2008
Commented:
Definitely pivot tables. Select a cell of your table, Alt+DP will insert a pivot table, put user_id as the row field, and price as the data field. If price comes up as Count of Price, right-click, Field Settings, and choose Sum to get Sum of Price.

For extended information:
Check this for Excel 2003 and down
http://office.microsoft.com/en-us/excel-help/pivottable-reports-101-HA001034632.aspx
Check that for Excel 2007 and up
http://office.microsoft.com/en-us/excel-help/pivottable-i-get-started-with-pivottable-reports-in-excel-2007-RZ010205886.aspx

Thomas
Commented:
check this excel file
sumuniquesRecords.xls

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial