View Single Post
 
Old 08-05-2022, 01:57 AM
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, I did try the same thing before posting but it didn't work

Code:
.Text = "(" & arrA(i) & ")([ \^s])([A-Z0-9.]{1,})"
Maybe it needs an IF...Then - code below is taken from an auto numbering macro I have and wondering if it could be adapted for my highlight purpose perhaps

Code:
iNum = UBound(Split(.text, "."))
If IsNumeric(Split(.text, ".")(UBound(Split(.text, ".")))) Then iNum = iNum + 1
If iNum < 10 Then
.text = vbNullString
Reply With Quote