Bold specific alphanumeric text...

Dan10

New Member
Joined
Nov 26, 2021
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I need a macro which will bold specific alphanumeric text. The text always starts with a capital T, G, H or W and is always followed by either a one, two or three digit numeric value with no spaces. The text is variably in one or more cells in one or two columns. Any help with this would be much appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You probably want to look into regular expressions to use a pattern to find each substring of interest in a cell. You can then loop over each submatch, find the starting position, it's length and use the Range.Characters() property to Bold the Font at specific indices.
 
Upvote 0
The text is variably in one or more cells in one or two columns.
That is a bit vague. Could you give us a smallish set of sample data with XL2BB and explain again in relation to that specific sample data?
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

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