Help with highlighting specific words in a cell

Cruiser69

Board Regular
Joined
Mar 12, 2018
Messages
68
Office Version
  1. 365
Platform
  1. Windows
Hi all.
We have started to use Google Sheets more at work and I am trying to find a way to highlight specific trigger words in a cell for age restricted and vat related items.
Age restricted e.g. knife, hammer, axe etc..
For vat related e.g. Baby Child's, Children etc..

When the excel macro is run, it highlights any age restricted words in red and Vat related words in green.

Is this possible with a Google script.

Thanks for looking.

Regards,

Graham
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
To highlight specific words in Google Sheets, you can use conditional formatting. Here's how you can do it:

  1. Select the range: Select the range of cells where you want to apply the conditional formatting.
  2. Open Conditional Formatting: Go to Format > Conditional formatting from the menu bar.
  3. Add a new rule:
    • Click on the "+ Add another rule" button.
    • Choose "Text contains" from the dropdown menu under "Format cells if...".
    • Enter the specific word you want to highlight in the text box.
  4. Choose the formatting style:
    • Click on the paint bucket icon to choose the formatting style for the highlighted cells. You can choose the text color, background color, etc.
  5. Apply the rule:
    • Click on the "Done" button to apply the rule.
Repeat these steps for each specific word you want to highlight. You can add multiple rules for different words or phrases. Google Sheets will apply the specified formatting to any cell that contains the word or phrase you've defined.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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