1、VBA 用 For Each 循環在指定區域填充單元格 R1C1 形式的地址名。
程序運行效果應如下:
代碼
Sub RC() Dim cell As Range, i As Integer '聲明變量
For Each cell In Range("B2:H13") cell.Value = "R" & cell.Row & "C" & cell.Column Next
End Sub
1、VBA 用 For Each 循環在指定區域填充單元格 R1C1 形式的地址名。
程序運行效果應如下:
代碼
Sub RC() Dim cell As Range, i As Integer '聲明變量
For Each cell In Range("B2:H13") cell.Value = "R" & cell.Row & "C" & cell.Column Next
End Sub
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。