View Single Post
 
Old 08-04-2022, 11:40 PM
Shelley Lou Shelley Lou is offline Windows 10 Office 2016
Expert
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Highlight numbers only after or before specific words help

Hi Andrew, thank you so much for updating the code it is very much appreciated. After testing it a few times I don't think the fields part I added needs to be in there as your code doesn't actually pick them up anyway so I have removed that part.

If there is a non-breaking space between the word and number the code isn't picking this up, I've tried adding in ([ \^s]) but this just removed the number so I need to add in if there is a space or non-breaking space.

Is there a way to include all the numbers for sub levels 1.1, 1.1.1 and 1.1.1.1 as it only seems to pick up the first number at the moment.

highlight.PNG
Reply With Quote