gpt4 book ai didi

vba - 公式拖拽查询

转载 作者:行者123 更新时间:2023-12-02 16:00:41 25 4
gpt4 key购买 nike

我正在尝试使用以下代码将公式从范围拖到其下一个直接列

Range(Cells(11, lc2), Cells(70, lc2)).AutoFill _
Destination:=Range(Cells(11, lc2 + 1), Cells(70, lc2 + 1)), Type:=xlFillDefault

我遇到 1004 错误

请指教

最佳答案

您正在使用的列 lc2 必须包含在目标中,例如

Range(Cells(11, lc2), Cells(70, lc2)).AutoFill _
Destination:=Range(Cells(11, lc2), Cells(70, lc2 + 1)), Type:=xlFillDefault

这意味着您无法仅使用列 lc2+1 进行自动填充

关于vba - 公式拖拽查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50679534/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com