【发布时间】:2015-03-28 14:05:30
【问题描述】:
我正在尝试使用我之前记录的 formulaR1C1 和 = IF() 自动填充一个范围,但我不断收到 1004 错误。
我有这个循环在这个特定的 sub 中运行了几次,它适用于所有其他公式,但是使用 = IF() 它不起作用......
rcell1.FormulaR1C1 = "=IF(RC[-1]>0;RC[-1];0)" 行被突出显示。
Set subgain = Range(Cells(i - period - 1, 16), Cells(i + j, 16))
With subgain
For Each rcell1 In subgain
rcell1.FormulaR1C1 = "=IF(RC[-1]>0;RC[-1];0)"
Next rcell1
End With
有什么想法吗?
【问题讨论】: