Search for exact word in comma separated string

DarkSmile

Board Regular
Joined
Feb 22, 2021
Messages
90
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm trying to detect if a exact word is in a comma separated sting, but I'm getting false positives with my formula.

Let me give a bit of explanation, in B4 I have a dropdown list, where you can choose multiple categories , these categories get separated by a comma in the cell.
I now want to return true/false if the exact word is found in the cell.

TCA berekening.xlsm
AB
4Categorieën:CI, D, AII
5FTE:
6
7AIyes
8AIIyes
9BIno
10BIIno
11BIIIno
12C0no
13CIyes
14CIIno
15CIIIno
16CIVno
17Dyes
18Eno
19FIno
20FIIno
21Gno
22Hno
23Iyes
24Jno
25Kno
FSSC 22000 v6
Cell Formulas
RangeFormula
B7:B25B7=IF(ISNUMBER(SEARCH(A7,$B$4)),"yes","no")
Named Ranges
NameRefers ToCells
FSSC_CAT_DROPDOWN='FSSC 22000 v6'!$B$4B7:B25
Cells with Data Validation
CellAllowCriteria
B4List=FSSC_Cat
B5List=FSSC_FTE
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Excel Formula:
=IF(ISNUMBER(SEARCH(","&A7&",",","&$B$4&",")),"yes","no")
 
Upvote 0
How about
Excel Formula:
=IF(ISNUMBER(SEARCH(","&A7&",",","&$B$4&",")),"yes","no")
Hi Fluff, thank you for your response, but it's not working, see below the output.

TCA berekening.xlsm
AB
4Categorieën:CI, D, AII
5FTE:
6
7AIno
8AIIno
9BIno
10BIIno
11BIIIno
12C0no
13CIyes
14CIIno
15CIIIno
16CIVno
17Dno
18Eno
19FIno
20FIIno
21Gno
22Hno
23Ino
24Jno
25Kno
FSSC 22000 v6
Cell Formulas
RangeFormula
B7:B25B7=IF(ISNUMBER(SEARCH(","&A7&",",","&$B$4&",")),"yes","no")
Named Ranges
NameRefers ToCells
FSSC_CAT_DROPDOWN='FSSC 22000 v6'!$B$4B7:B25
Cells with Data Validation
CellAllowCriteria
B4List=FSSC_Cat
B5List=FSSC_FTE
 
Upvote 0
Perhaps add a space after the comma concatenated before the text strings?
Book4
AB
4Categorieën:CI, D, AII
5FTE:
6
7AIno
8AIIyes
9BIno
10BIIno
11BIIIno
12C0no
13CIyes
14CIIno
15CIIIno
16CIVno
17Dyes
18Eno
19FIno
20FIIno
21Gno
22Hno
23Ino
24Jno
25Kno
Sheet1
Cell Formulas
RangeFormula
B7:B25B7=IF(ISNUMBER(SEARCH(", "&A7&",",", "&$B$4&",")),"yes","no")
 
Upvote 0
Solution
Upvote 0

Forum statistics

Threads
1,215,106
Messages
6,123,124
Members
449,096
Latest member
provoking

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