excel表格怎么设置成宋体
2025-01-12 10:59:36
1.如何在excel利用VBA将选中单元格中中文改成“宋体”,字符以及数
Sub aa()
Dim str As String
Dim i As Integer
Dim a As Range
Set a = Range("a1:a10") '选择的范围
For Each b In a
str = b.Cells
For i = 1 To Len(str)
If Asc(Mid(str, i, 1)) < 0 Then
b.Cells.Font.Name = "黑体"
Else
b.Cells.Font.Name = "Arial"
End If
Next i
Next
End Sub