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 came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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,143,916
Messages
5,721,525
Members
422,369
Latest member
redinator

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