I have a column as below and I need to red color & bold numbers = 9, 11, 24. I appreciate your help
1, 3, 7
2, 9, 11, 24
2, 24, 3, 6
4, 11, 24, 65
I have a column as below and I need to red color & bold numbers = 9, 11, 24. I appreciate your help
1, 3, 7
2, 9, 11, 24
2, 24, 3, 6
4, 11, 24, 65
Select the cell(s) then run the code.
Sub test() Dim r As Range, m As Object With CreateObject("VBScript.RegExp") .Global = True .Pattern = "\b(9|11|24)\b" For Each r In Selection For Each m In .Execute(r.Value) With r.Characters(m.firstindex + 1, m.Length) .Font.Color = vbRed .Font.Bold = True End With Next Next End With End Sub
Jindon,
Thanks very much. Your macro always impress me!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks