如何把excel表中的小写字母都变成大写?

如何把excel表中的小写字母都变成大写?

office培训班解答:请运行以下程序:(测试通过)
Sub ConvertToUpperCase()
Dim Rng As Range
Worksheets(“Sheet1”).UsedRange.Select
For Each Rng In Selection.Cells
If Rng.HasFormula = False Then
Rng.value = UCase(Rng.value)
End If
Next Rng
End Sub

发表评论

邮箱地址不会被公开。 必填项已用*标注