How to find whether a text string occurs in a set of rows

tjallen

New Member
Joined
Oct 11, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a table with the first column containing names that repeat, and another column containing words. I want to find out whether a specific word "Stop" occurs for each Name in the table, and populate the cells next to each name with either a Y or N. How do I create a formula in E3-E6 to accomplish this?

1602429222209.png


1602429222209.png
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi & welcome to MrExcel.
How about
+Fluff v2.xlsm
ABCDE
1
2JoeSpeed
3JoeSpeedJoeY
4JoeStopMikeN
5MikeLightNormY
6MikeSpeedSamN
7NormSpeed
8NormSpeed
9NormStop
10NormStop
11SamLight
12SamPark
13SamLane
Data
Cell Formulas
RangeFormula
D3:D6D3=UNIQUE(A2:A13)
E3:E6E3=IF(COUNTIFS(A:A,D3#,B:B,"Stop"),"Y","N")
Dynamic array formulas.
 
Upvote 0
Hi & welcome to MrExcel.
How about
+Fluff v2.xlsm
ABCDE
1
2JoeSpeed
3JoeSpeedJoeY
4JoeStopMikeN
5MikeLightNormY
6MikeSpeedSamN
7NormSpeed
8NormSpeed
9NormStop
10NormStop
11SamLight
12SamPark
13SamLane
Data
Cell Formulas
RangeFormula
D3:D6D3=UNIQUE(A2:A13)
E3:E6E3=IF(COUNTIFS(A:A,D3#,B:B,"Stop"),"Y","N")
Dynamic array formulas.

I'm embarrassed to say that works! I obviously need to better understand array formulas, as I was trying to go down Vlookup and Match routes. Out of curiosity, what does the "D3#" represent? I found I had to delete the "#" sign to make it work.

Thanks again
 
Upvote 0
The # sign indicates that D3 is the start of a spill range & so the countifs formula will then spill down to match.

Also the Countifs formula is not an array formula. ;)
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
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