当前位置:首页教育技巧excel技巧excel数据库

excel表格怎么设置成宋体

2024-07-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

相关信息


电脑版

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2024 www.at317.com All Rights Reserved .