我希望将Excel中选定的范围转换为大写。这是我的密码
Dim rng As Range
Set rng = Selection
rng.Value = rng.Parent.Evaluate("INDEX(UPPER(" & rng.Address & "),)")它在很大范围内工作,但是给出了#值!仅选择单个单元格时出错。
发布于 2018-02-27 01:31:01
发布于 2018-02-26 23:16:54
此代码适用于单个单元格或所选内容:
Sub ChangeCellCase()
Dim CellCase
For Each CellCase In Selection
CellCase.Value = UCase(CellCase.Value)
Next
End Subhttps://stackoverflow.com/questions/48998336
复制相似问题