ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need formula to add cells with same group (https://www.excelbanter.com/excel-discussion-misc-queries/240699-need-formula-add-cells-same-group.html)

brantty

Need formula to add cells with same group
 
I have a sheet 1 with two columns. Column A has a manufacturer name, Column
B has a number. Column A has the manufacturer names repeated multiple times
within the column. Sheet 2, Coumn A, I have a clean list of manfufacturers
that match the cells in Sheet1 Column A. In sheet 2, Coulmn B, I need a
formula that will add all the numbers for each manufacturer. So, if Hp shows
up 15 times in column A, the formula will add only those numbers that match
column A and produce the total of the numbers added together for that
manufacturer.

Ex. Sheet 1: Column A, Column B

HP, 5.50
HP, 5.75
DF, 5.00
DF, 4.25

Sheet 2: end result Im looking for:
HP, 11.25
DF, 9.25

smartin

Need formula to add cells with same group
 
brantty wrote:
I have a sheet 1 with two columns. Column A has a manufacturer name, Column
B has a number. Column A has the manufacturer names repeated multiple times
within the column. Sheet 2, Coumn A, I have a clean list of manfufacturers
that match the cells in Sheet1 Column A. In sheet 2, Coulmn B, I need a
formula that will add all the numbers for each manufacturer. So, if Hp shows
up 15 times in column A, the formula will add only those numbers that match
column A and produce the total of the numbers added together for that
manufacturer.

Ex. Sheet 1: Column A, Column B

HP, 5.50
HP, 5.75
DF, 5.00
DF, 4.25

Sheet 2: end result Im looking for:
HP, 11.25
DF, 9.25


SUMIF is your friend here. Per help SUMIF "Adds the cells specified by a
given criteria."

In Sheet2 B1 and fill down:

=SUMIF(Sheet1!A:A,A1,Sheet1!B:B)

where Sheet2 A1 = HP
A2 = DF
etc.

brantty

Need formula to add cells with same group
 


"smartin" wrote:

brantty wrote:
I have a sheet 1 with two columns. Column A has a manufacturer name, Column
B has a number. Column A has the manufacturer names repeated multiple times
within the column. Sheet 2, Coumn A, I have a clean list of manfufacturers
that match the cells in Sheet1 Column A. In sheet 2, Coulmn B, I need a
formula that will add all the numbers for each manufacturer. So, if Hp shows
up 15 times in column A, the formula will add only those numbers that match
column A and produce the total of the numbers added together for that
manufacturer.

Ex. Sheet 1: Column A, Column B

HP, 5.50
HP, 5.75
DF, 5.00
DF, 4.25

Sheet 2: end result Im looking for:
HP, 11.25
DF, 9.25


SUMIF is your friend here. Per help SUMIF "Adds the cells specified by a
given criteria."

In Sheet2 B1 and fill down:

=SUMIF(Sheet1!A:A,A1,Sheet1!B:B)

where Sheet2 A1 = HP
A2 = DF
etc.


Nice work. It worked and you taught me something new. Thanks


All times are GMT +1. The time now is 06:09 AM.

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