|
本帖最后由 weiyingde 于 2017-3-14 20:57 编辑
Sub 修改颜色字体()
Dim reg As Object, i%, j%, mstr$
Set reg = CreateObject("vbscript.regexp")
For i = 2 To Sheets("临时整理").Range("a65536").End(3).Row
Set Rng = Sheets("临时整理").Cells(i, "a")
mstr = Rng.Text
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "[A-Za-z]"
For j = 0 To reg.Execute(mstr).Count - 1
With Rng.Characters(reg.Execute(mstr)(j).firstindex + 1, 1).Font
.Color.RGB = RGB(0, 0, 255)
.NameFarEast = "楷体"
.NameAscii = "Arial Narrow"
End With
Next
Next
Set reg = Nothing
End Sub |
|