Count cells based on a text phrase within a series of text phrases

TheSecretaryJen

New Member
Joined
Jul 3, 2015
Messages
18
I want to be able to count the cells in a table column based on a phrase that is contained in the cell, but the cell will also contain other phrases separated by commas. Let's say the cells have text like this:

COLUMN HEADER
Active Member
Active Member, Interested Party
Interested Party
Uninterested Party, Active Member
Inactive Member, Uninterested Party
Inactive Member, Interested Party
Interested Party
Inactive Member
Active Member

I want a formula that will count the number of cells that include the phrase "Active Member", no matter what else the cell might contain and no matter what order the phrases are in. So in this example, the formula should return 4.

Is this possible without a macro? I can do macros, but my boss can't, and this spreadsheet is for him.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You can use wildcards with the COUNTIF function, like so:

=COUNTIF(A:A,"*active member*")

However, in this case it would also match every row with "inactive member" since "active member" is a substring of that. To handle that, you can do this:

=COUNTIF(A:A,"*active member*")-COUNTIF(A:A,"*inactive member*")


Hope this works for you!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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