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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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)
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
Have a look at Exce's PivotTable functionality...
Book1
ABCDEFGHIJ
1ClassQuantitySumofQuantity
2AC10ClassTotal
3DC10AC20
4DC10DC20
5DM10DM10
6AC10GrandTotal50
7
8
Sheet5
 

Forum statistics

Threads
1,181,460
Messages
5,930,060
Members
436,718
Latest member
messa57fr

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
Top