Private Sub CommandButtonl_Click()
Cells.Font.ColorIndex = 1
End Sub
Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rng As Range, i As Integer
Dim T As String
Dim C As Integer
For Each rng In Selection
T = "河北"
C = 3
i = 1
Do While InStr(i, rng, T) > 0
rng.Characters(InStr(i, rng, T), Len(T)).Font.ColorIndex = C
i = InStr(i, rng, T) + 1
Loop
Next
End Sub
效果