Coutifs/sumifs and populating with yes or no

stevembe

Well-known Member
Joined
Mar 14, 2011
Messages
501
Firstly many thanks for taking the time to read.
In cell K2 I want to count the number of times the phrase “Grade 7” appears in column M8:M200 but at the same time if this phrase appears in column M I need column R8:R200 populated with the word “Yes” and “No” if it doesn’t.
Most grateful for any assistance.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi,

In K2 :

=COUNTIF($M$8:$M$200, "Grade 7")

In R8 then copy down to R200 :

=IF(M8 = "Grade 7", "Yes", "No")
 
Last edited:
Upvote 0
Hi,

In K2 :

=COUNTIF($M$8:$M$200, "Grade 7")

In R8 then copy down to R200 :

=IF(M8 = "Grade 7", "Yes", "No")

LouisH, thanks so much for the reply and my apologies, I notice I wasn't clear enough. There are Grades 1 to 7 so I am after a formula that works for this e.g, Grade 1, Grade 2, Grade 3 etc
 
Upvote 0
The previous formulas assumed "Grade 7" was the only text in the cell. If you want to count cells that CONTAINS "Grade 7" use these :

In K2 :

=COUNTIF($M$8:$M$200, "*Grade 7*")

In R8 then copy down to R200 :

=IF(ISNUMBER(SEARCH("Grade 7",M8)), "Yes","No")
 
Upvote 0
The previous formulas assumed "Grade 7" was the only text in the cell. If you want to count cells that CONTAINS "Grade 7" use these :

In K2 :

=COUNTIF($M$8:$M$200, "*Grade 7*")

In R8 then copy down to R200 :

=IF(ISNUMBER(SEARCH("Grade 7",M8)), "Yes","No")

That's perfect, many thanks for your time, much appreciated
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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