Dear Experts,
I have used the following macro to BOLD a single text string within a cell and it works fine for a single string:
[VBA]Sub MakeWordBold()
Dim strSearch As String, searchRng As Range, i As Long, cel As Range
Set searchRng = Range("A1:A10")
strSearch = InputBox("Please enter the text to make bold:", "Bold Text")
If strSearch = "" Then Exit Sub
For Each cel In searchRng
With cel
.Font.Bold = False
For i = 1 To Len(.Text) - Len(strSearch) Step 1
If Mid(.Text, i, Len(strSearch)) = strSearch Then
.Characters(i, Len(strSearch)).Font.Bold = True
End If
Next i
End With
Next cel
End Sub[/VBA]
The Macro above will do the following:
Example[dog]: "the dog is black" becomes "the dog is black"
Required: Can you adapt/create a macro to BOLD multiple strings within a single cell???
Example[dog, black]: "the dog is black"
Many thanks!!!
C