ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I add duplicated items in a list? Help! (https://www.excelbanter.com/excel-discussion-misc-queries/79251-how-can-i-add-duplicated-items-list-help.html)

Class316

How can I add duplicated items in a list? Help!
 

Ok, here's what I have


type quantity

a 1
a 2
b 3
b 3
b 1
c 2
c 2

I need to have:

a 3
b 7
c 4

What is the best way to do this without tedious summations and
deletions? thanks in advance!


--
Class316
------------------------------------------------------------------------
Class316's Profile: http://www.excelforum.com/member.php...o&userid=24163
View this thread: http://www.excelforum.com/showthread...hreadid=525812


SteveG

How can I add duplicated items in a list? Help!
 

Assuming your data is in A1:B7. In say A10:A12 you enter a,b&C
respectively. Use this in B10 and copy down to B12.

=SUMPRODUCT(($A$1:$A$7=A10)*$B$1:$B$7)

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=525812


Kevin B

How can I add duplicated items in a list? Help!
 
You can use sub totals for the purpose and collapse the outline to level 2 to
show just summations at each change.

Sort your data by type and click DATA in the menu and select SUBTOTALS. Set
the value for the AT EACH CHANGE IN to TYped, set USE FUNCTION to Sum and
check QTY in the ADD SUBTOTAL TO list.

You should get 3 outline buttons to the left of column row in the
workhsheet. Click 2 to view only the totals at each change in Type.
--
Kevin Backmann


"Class316" wrote:


Ok, here's what I have


type quantity

a 1
a 2
b 3
b 3
b 1
c 2
c 2

I need to have:

a 3
b 7
c 4

What is the best way to do this without tedious summations and
deletions? thanks in advance!


--
Class316
------------------------------------------------------------------------
Class316's Profile: http://www.excelforum.com/member.php...o&userid=24163
View this thread: http://www.excelforum.com/showthread...hreadid=525812



Ron Coderre

How can I add duplicated items in a list? Help!
 
Try a Pivot Table this:

DataPivot Table
Use Excel
Select your data
Click the [Layout] button

ROW: Drag the Type field here
DATA: Drag the quantity field here
If it doesn't list as Sum of Dates...dbl-click it and set it to Sum
Click [OK]
Select where you want the Pivot Table...and you're done!

That will list each Type and the total quantity for that type.

To refresh the Pivot Table, just right click it and select Refresh Data

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Class316" wrote:


Ok, here's what I have


type quantity

a 1
a 2
b 3
b 3
b 1
c 2
c 2

I need to have:

a 3
b 7
c 4

What is the best way to do this without tedious summations and
deletions? thanks in advance!


--
Class316
------------------------------------------------------------------------
Class316's Profile: http://www.excelforum.com/member.php...o&userid=24163
View this thread: http://www.excelforum.com/showthread...hreadid=525812




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com