VBA to check if a worksheet contains texts from a given text list

Cennos

New Member
Joined
Jun 15, 2015
Messages
1
Hello,

I have a worksheet of several thousand rows with about 50 columns and a sheet containing a list of text that are not allowed to exist in this worksheet (named it "Censored texts"). The censored texts might exist in a text string, not stand alone. I tried using formula to check if a column containing any text in the list. The formula worked but it made the computer freeze all the time and each column has to be checked once with the formula.

For example:
Column A in "Censored text" sheet contains the list of censored words: "Nudity, Naked, Erotic, ****, etc."
A cell in the active sheet contains: "Many people think that nudity in the public is a sin". Another cell says: "Being naked is good".

Do you have any VBA that can help me to check if any cell in the worksheet containing the texts and it'll have a message box that says the the cells location and the texts found.

Thank you in advanced,
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,196,463
Messages
6,015,396
Members
441,890
Latest member
Liero131313

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