# Countif Help!

#### Calix21

##### New Member
Would appreciate you could help me sort this out. I am a beginner in excel.

I have this following data:

b1=10 c1=8 d1=2 e1=5
b2=m c2=m d2=x e2=m f2=23

how to add the course hours number only if there is an m on a cell?

Thank you!

Last edited:

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### VBA Geek

##### MrExcel MVP
<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">F4</th><td style="text-align:left">=SUMIFS(<font color="Blue">B1:E1,B2:E2,"m"</font>)</td></tr></tbody></table></td></tr></table><br />

#### Calix21

##### New Member
That worked! Thank you very much!!!
how about if i need the cell with "m" and "mx"?

Thanks!

##### MrExcel MVP
That worked! Thank you very much!!!
how about if i need the cell with "m" and "mx"?

Thanks!

Try...

=SUM(SUMIFS(B1:E1,B2:E2,{"m","mx"}))

Replies
1
Views
29
Replies
7
Views
87
Replies
7
Views
79
Replies
3
Views
231
Replies
2
Views
69

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,714
Messages
5,833,276
Members
430,201
Latest member
Deepakpilla36

### 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.

### Which adblocker are you using?

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

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