How To Check If RANGE OF TEXTSTRINGS Contains ANY of the SEVERAL TEXT KEYWORDS In Excel?

mtahreemalam

New Member
Joined
Nov 18, 2019
Messages
28
Hello,
I have a range of TEXT STRINGS in column A, and a list of WORDS in column B. I want to highlight all cells which in column A that contain or match ANY WORD from the text string in column A.
 

Attachments

  • 1575657539403.png
    1575657539403.png
    20.1 KB · Views: 14

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Go to cell a1. Then click Home, then Conditional Formatting and then New Rule and then "use formula to determine..." and then enter the following formula:

=ISERROR(LOOKUP(9.99999999999999E+307,SEARCH(B$1:$B$3,A1),$B$1:$B$3))=FALSE

Then choose to highlight with the colour you want and click apply

please replace $b$3 with the number of the last cell in column B. This only works up until the last cell. If you want to select the entire column B, you would need to just enter random text in the rest of column B. For example, you could enter "RANDOM" into every cell in column B after your input to fill it up

Then you could enter
=ISERROR(LOOKUP(9.99999999999999E+307,SEARCH(B:B,A1),B:B))=FALSE

Let me know how this works
 
Upvote 0
Try this

Select the cells in the column A and put the following formula in the conditional format.

=SUM(IF($B$1:$B$400<>"",--ISNUMBER(SEARCH($B$1:$B$400,$A1))))
 
Upvote 0
Or this formula in cell a1 and copy the formatting to all the other cells in column A

=ISERROR(LOOKUP(9.99999999999999E+307,SEARCH(INDIRECT("B1:B"&LOOKUP(2,1/(B:B<>""),ROW(B:B))),A1),INDIRECT("B1:B"&LOOKUP(2,1/(B:B<>""),ROW(B:B)))))=FALSE
 
Upvote 0
match ANY WORD from the text string in column A.
Since you are trying to match "WORDS" I think the previous suggestions will fail since they will match any substring rather than whole words. For example, I note that at least one of the suggestions highlights "headrest pillow" when column B contains neither "headrest" nor "pillow" (but does contain "pill", hence the substring match)

Try this instead. (Partial sheet only shown)

Book1
AB
1TEXT STRINGSKeywords
2headrest tablet mountBattery
3headrest hooksAlexa
4headrest dvd playerxbox
5headrest ipad holderDécor
6headrest tablet holderpill
7headrest pillowtv
8headrest covers for carsjacket
9same daylotion
10same day deliveryRechargable
11same pennis forever bannerplaystation
12peptides serum for facedecoration
13peptides colagenThermometer
14peptides for faceshirts
15peptides powderperfume
16peptides serumbatteries
17peptides creamnintendo
18peptides cream for facegift
19windbreaker menmg
20windbreaker womenhoodie
21windbreaker pants mendeodorant
22windbreaker jacket womenoil
23windbreaker pants womenyoga mat
24windbreaker jacketsoap
25windbreaker pantsiphone
26windbreaker mens jacketlubricant
27windbreaker women 80sbook
28howard stern comes againsolution
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A228Expression=LOOKUP(9E+99+307,SEARCH(" "&$B$2:$B$200&" "," "&A2&" "))textNO



but it was of the incorrect cells.
BTW, when you report something like that, it gives helpers nothing to go on. Give some examples of what was highlighted when it shouldn't be and explain why or what was not highlighted and should have been and why. You need to help us help you. ;)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

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