我想在VBA中简化这个,是否可能?
On Error Resume Next
[B11] = "=Y11"
[B12] = "=Y12"
[B13] = "=Y13"
[B14] = "=Y14"
[B15] = "=Y15"
[B16] = "=Y16"
...
End Sub
答案 0 :(得分:2)
尝试以下代码:
Range("B11:B16") = "=Y11"
答案 1 :(得分:0)
尝试以下:
for i=11 to 16
Range("B"& i) = "=Y"& i
next i