automatically underline certain key words in all cells in a column

skyport

Active Member
Joined
Aug 3, 2014
Messages
374
Was hoping there is a chance this can actually be done with some sort of VBA -automatically underline certain key words in all cells in a column
 
skyport,

key words would be updated on an ongoing basis

1. What worksheet name, and, range contains the key words?

2. What is the worksheet name that contains column K?

3. Can we see examples of what is in column K, beginning in what cell, words or strings?
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hiker, the program needs to work for new worksheets with different names ongoing. the range would be a specified column such as "K" where I could select the rows in column "K" to be included to receive the result.

The data will always begin in cell 1 of column K
 
Upvote 0
skyport,

1. What worksheet name, and, range contains the key words?

2. Or, are the key words always "anxiety", "depression", "psychiatric"?

3. Can we see examples of what is in column K?
 
Upvote 0
Hiker,

1. once again, worksheets will have different names. It must be able to work on different sheets with different names.

2. Key words would always be the same however, I need to be able to add to the list of the original three.

3. Data in Column K is simple reports that contain the target words. There is nothing more to analize on that part. It could be any words forming a report, story etc.
 
Upvote 0
3. Data in Column K is simple reports that contain the target words. There is nothing more to analize on that part. It could be any words forming a report, story etc.
What is not clear to me is... are the words you want to underline in a cell by themselves or are these words mixed-in with other text? If mixed-in with other text, did you want only the key word underlined or all the text in the cell underlined?
 
Upvote 0
Hi Rick, thanks for helping. The key words to be underlined would be mixed in with other words in each cell of column "K". They would never be all together in one cell. Column "K' may have as an example, 100 cells filled with data. Imagine that each cell of data in column "K" is a medical report or story of it's own. Within each of those stories or reports (one story or report per cell) there would exist those key words to be underlined.

I thought if I supplied the first 3 key words as I did and we got a program to work, I could just add the new key words as needed later on.
 
Upvote 0
Hi Rick, thanks for helping. The key words to be underlined would be mixed in with other words in each cell of column "K". They would never be all together in one cell. Column "K' may have as an example, 100 cells filled with data. Imagine that each cell of data in column "K" is a medical report or story of it's own. Within each of those stories or reports (one story or report per cell) there would exist those key words to be underlined.
Could two or more of your keywords appear in the same cell?

Could the same keyword appear in two or more times within the same cell?
 
Upvote 0
Rick, yes to both. any one, or more than one of the key words would likely repeat numerous times within each cell as well as appear and repeat in the different cells within column "K"
 
Upvote 0
Rick, yes to both. any one, or more than one of the key words would likely repeat numerous times within each cell as well as appear and repeat in the different cells within column "K"
Well, that complicates things slightly and, given the way Excel handle different formatting within the same cell, pretty much guarantees that the code will be somewhat slow (especially if you have a lot of cells and/or text involved). Let me or someone else (if others want to jump in) can do for you... just give us a little time to work something up.
 
Upvote 0

Forum statistics

Threads
1,221,443
Messages
6,159,907
Members
451,601
Latest member
terrynelson55

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