Return value if cell contains specific text

CAMERON854

New Member
Joined
Feb 5, 2020
Messages
19
Office Version
  1. 2016
Hello,
I am trying to count how many times a specific text appears in column M:M

for example:

if column M:M contains "CaCl" then return how many times this appeared in cell R4

so R4 would have a value of 105 if that's how many times CaCl was in column M:M

any help is greatly appreciated
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about
Excel Formula:
=countifs(M:M,"CaCl")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
How about
Excel Formula:
=sum(countifs(M:M,{"Cacl","NaDi","KCl"}))
 
Upvote 0
How about
Excel Formula:
=sum(countifs(M:M,{"Cacl","NaDi","KCl"}))
thank you it worked perfectly ! just needed the extra boost. this is how the formula turned out.

=SUM(COUNTIFS('July Blend (A)'!M:M,{"Test NaDi,","Test CaCl,","Test KCl,","Test MgCl,","Test NaCl,","REJECT ChkWgt,Test NaDi,","REJECT ChkWgt,Test NaCl,","REJECT ChkWgt,Test MgCl,","REJECT ChkWgt,Test KCl,","REJECT ChkWgt,Test CaCl,"}))
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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