Option Explicit
Sub TEST() '含{}_整格變字型
Call 還原
Dim A As Range
For Each A In Cells.SpecialCells(2)
If A Like "{*}" Then A.Font.Name = "微軟正黑體"
Next
End Sub
Sub 還原()
Cells.Font.Name = "新細明體"
End Sub
Sub TEST_1() '只{}內變字型, PS:同一格多組{}時只變第1組內的字型
Call 還原
Dim A As Range
For Each A In Cells.SpecialCells(2)
If A Like "{*}" Then
With A.Characters(Start:=InStr(A, "{") + 1, Length:=InStr(A, "}") - InStr(A, "{") - 1).Font
.Name = "微軟正黑體"
End With
End If
Next
End Sub作者: 自我感覺良好 時間: 2023-11-22 10:16
Sub TEST_1()
Call 還原
Dim A As Range
For Each A In Cells.SpecialCells(2)
If A Like "*{*}*" Then
With A.Characters(Start:=InStr(A, "{") + 1, Length:=InStr(A, "}") - InStr(A, "{") - 1).Font
.Name = "微軟正黑體"
End With
End If
Next
End Sub作者: 自我感覺良好 時間: 2023-11-22 17:01