【发布时间】:2017-08-16 01:38:12
【问题描述】:
ActiveCell.FormulaR1C1 = "Y"
Range("B1").Select
Dim lastcellex As String
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Select
lastcellex = ActiveCell.Address
Range("B1").Select
Selection.AutoFill Destination:=Range("B1:lastcellex")
谁能帮助我了解为什么我不断收到此错误?我将变量设置为等于范围内的最后一个单元格,但超过一列。因此,如果 A 列中的范围是 A55,则 lastcellex 将是 B55。我正在尝试让它从 B1:B55 自动填充。
请让我知道你们的想法。
【问题讨论】:
-
一行:
Range("B1").AutoFill Destination:=Range("B1:B" & Range("A1").End(xlDown).Row+1)