Highlight certain text in a cell - with varibles

mrpwagner

New Member
Joined
Jul 17, 2016
Messages
22
I have a large excel spread sheet with the following characters repeated: (CD #####). The #### are replaced for different situations. For example one instance might be CD 1-1 or CD 13-5, etc. I have seen that there are VBAs that can be used to color texts but I am looking to HIGHLIGHT the text. I would love some help.

Ideally the VBA would include a the ability to highlight from the open parentheses sign to the close parentheses sign.

Thanks again for your help!!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
What do you mean by "highlight" the text?
Also are the cells hard values, or formulae?
 
Upvote 0
What do you mean by "highlight" the text?
Also are the cells hard values, or formulae?

The cells are filled with text. Not numbers, not formulas.

I would light to highlight the text in yellow, so black text with a yellow background.



ONLY FOR THE SELECTED TEXT. i know how to color the whole cell. This does not serve my purpose.
 
Upvote 0
The cells are filled with text. Not numbers, not formulas.

I would light to highlight the text in yellow, so black text with a yellow background.

ONLY FOR THE SELECTED TEXT. i know how to color the whole cell. This does not serve my purpose.
When modifying the color part for a portion of a cell, you can only modify the text color, not its background.
 
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