Bold or change color of text substring in cell based on keyword in another cell?

Status
Not open for further replies.

MrD101

New Member
Joined
Sep 2, 2021
Messages
10
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
HI, VBA novice here looking for a little help and advice.

I think I need VBA for this, but not 100% sure. I'm also not sure if this is something better done automatically each time I open a tab, or you have to hit a button to run each time you go to a tab, or if I can just run this when creating the spreadsheet and once saved the keywords are saved as bolded or with the color changed (just some way to make the keywords stand out). That latter would probably be easier so others benefit from what's already been done, but looking for any help possible.

I have a spreadsheet with multiple tabs where I would like to highlight keywords in one cell of text that match the contents of another cell on same row (case insensitive). The tabs do not always have the same number of columns, but there will be one column with the keyword and one column with text where I would like to bold or change the color of each instance of the keyword found in the text.

For example:
Tab A
ID Name Desc Notes
10 Excel None I need excel help. I'm newer to Excel.
11 VBA None I need to understand VBA more.

So, in this example I would like to use column B (Name) as the keyword and bold or change color to instances found in column D (notes).
In row 1, I would want the two instances of "excel" to be bold or change color to have them stand out. (I need excel help. I'm newer to Excel.)
In row 2, I would want the one instance of "VBA" to be bold or change color. (I need to understand VBA more.)

Tab B
ID Name Desc Value Notes
12 Word None 100 MS Word is used more than WordPerfect.

So, in this example again use column B (Name) for the keywords and bold or change color to instances found in column E (notes).
In row 1, I would want the two instances of "word" to be bold or change color to have them stand out. It shouldn't matter if it's part of a bigger word if possible. (MS Word is used more than WordPerfect.)

Thanks for all assistance.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Duplicate to: [VBA] Bold keyword matches in cell text

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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