if condition is true, then sum

CHRISMAZUR

New Member
Joined
Jan 13, 2004
Messages
7
I have the following data in seperate columns:

2 M
5 C
3 C
3 C
4 M
2 M
6 B

I want ot know how many M's, C's , and B's are there
M=
C=
B=

How do write a formula that will add all the numbers that are M's, C's and B's
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
hi - welcome to the board!

reivew the help files for the sumif() & countif() functions. also check out pivot tables. post back if you need more.
 
Upvote 0
hi!
try this!
=sumif(b:B,"M",a:A)
where column B is the crietria and coumn A is the values
to sum up.
 
Upvote 0
Book1
ABCDEF
1NumID
22MCountWhat?MCB
35CHowManyinstancesinColB?331
43CSumofvaluesinColA8116
53C
64M
72M
86B
9IDDataTotal
10BSumofNum6
11CountofID1
12CSumofNum11
13CountofID3
14MSumofNum8
15CountofID3
16TotalSumofNum25
17TotalCountofID7
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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