|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 vba789 于 2014-12-6 14:21 编辑
Sub 导入公式()
Dim i As Long
For i = 3 To 300 Step 8
Application.ScreenUpdating = False
ActiveCell.FormulaR1C1 = "=IF(入户调查表!RC[-1]>0,入户调查表!RC[-1],"""")"
Range("C30:D30").Select
ActiveCell.FormulaR1C1 = "=IF(入户调查表!R[&i&]C[-1]>0,入户调查表!R[&i&]C[-1],"""")"
' Range("C57:D57").Select
' ActiveCell.FormulaR1C1 = "=IF(入户调查表!R[16]C[-1]>0,入户调查表!R[16]C[-1],"""")"
' Range("C84:D84").Select
' ActiveCell.FormulaR1C1 = "=IF(入户调查表!R[24]C[-1]>0,入户调查表!R[24]C[-1],"""")"
' Range("C111:D111").Select
' ActiveCell.FormulaR1C1 = "=IF(入户调查表!R[32]C[-1]>0,入户调查表!R[32]C[-1],"""")"
' Range("C138:D138").Select
' ActiveCell.FormulaR1C1 = "=IF(入户调查表!R[40]C[-1]>0,入户调查表!R[40]C[-1],"""")"
' Range("C165:D165").Select
Next
MsgBox "公式已导入"
Application.ScreenUpdating = True
End Sub
|
|