SUM & CountIF functions

j3wb0y

New Member
Joined
Mar 14, 2015
Messages
2
Hey everyone!

I am hoping someone can be of assistance with my dilemma. I am currently using the formula below:

=SUM(COUNTIF($B$1:$H$13,"Keith T")*0.5)+SUM(COUNTIF($B$1:$H$13,"Keith A"))

The problem with the formula above is that it is subtracting the count if I place more than one String in a single cell. For instance, Cell A5 may have "Keith T" and "Tom T" in the same cell separated by a comma or ALT+ENTER.

Would anyone know a way to prevent this from happening?

Thank you,

Josh
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
=SUM(COUNTIF($B$1:$H$13,"*Keith T*")*0.5)+SUM(COUNTIF($B$1:$H$13,"*Keith A*"))

Hoppe it helps
 
Upvote 0
1)

=SUM(COUNTIFS($B$1:$H$13,{"*Keith T*","*Keith A*"})*{0.5,1})

2) If you use cell references...

=SUMPRODUCT(--(I1:J1<>""),COUNTIFS($B$1:$H$13,"*"&I1:J1&"*"),{0.5,1})

where I1 = Keith T and J1 = Keith A.
 
Upvote 0
Thank you! I went with Aladin's formula to simplify it. Krykm, yours worked as well so thank you!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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