帮忙修改VB编程
Sub Macro3()'
' Macro3 Macro
'
'
Range("C3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-2]=1,C[-1],)"
Range("D3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-3]=2,C[-2],)"
Range("E3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-4]=3,C[-3],)"
Range("F3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-5]=4,C[-4],)"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-6]=5,C[-5],)"
Range("C3:AJ3").Select
Selection.AutoFill Destination:=Range("C3:AJ2469")
Range("C3:AJ2469").Select
Range("D3").Select
End Sub
要求其中的 Range("C3").Select
ActiveCell.FormulaR1C1 = "=IF(C[-2]=1,C[-1],)"
数字2、1以N+1递增,并对应输出在C、D、E、F、G、H........AJ列