search and sum

audkb2002

New Member
Joined
Oct 24, 2002
Messages
1
Is there a way to search for matches and then sum other cells pertaining to those matched? Let's say I have rows and each has a column of classes (with AC, DC, DM) and a column of quantity. Is there a way to find all rows that = AC and add up all the quantities for AC?

AC 10
DC 10
DC 10
DM 10
AC 10

So basically, I want something to get the results AC=20, DC= 20, DM=10...

Thanks in advance.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
On 2002-10-25 18:26, audkb2002 wrote:
Is there a way to search for matches and then sum other cells pertaining to those matched? Let's say I have rows and each has a column of classes (with AC, DC, DM) and a column of quantity. Is there a way to find all rows that = AC and add up all the quantities for AC?

AC 10
DC 10
DC 10
DM 10
AC 10

So basically, I want something to get the results AC=20, DC= 20, DM=10...

Thanks in advance.

In C2 on enter: AC, DC, DM

In D2 enter & copy down:

=SUMIF($A$2:$A$6,C2,$B$2:$B$6)
 
Upvote 0
Have a look at Exce's PivotTable functionality...
Book1
ABCDEFGHIJ
1ClassQuantitySumofQuantity
2AC10ClassTotal
3DC10AC20
4DC10DC20
5DM10DM10
6AC10GrandTotal50
7
8
Sheet5
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top