I am trying to write a VBA-Script that will fill write the following formula:
=IF(F9="";A8;A8+1)
into a given range of cells in Excel 2007. I can get Excel to write any value of formula into the cells, but the IF-Condition. Here is the code I am using and returns error 400:
Public Sub fill_Down()
Dim my_range As Range
With Worksheets("Kostenmatrix")
Set my_range = .Range("A9:A200")
my_range.Formula = "=IF(F9="";A8;A8+1)"
End With
End Sub
Thanks in advance for any hints how to solve this issue!
Hagi
=IF(F9="";A8;A8+1)
into a given range of cells in Excel 2007. I can get Excel to write any value of formula into the cells, but the IF-Condition. Here is the code I am using and returns error 400:
Public Sub fill_Down()
Dim my_range As Range
With Worksheets("Kostenmatrix")
Set my_range = .Range("A9:A200")
my_range.Formula = "=IF(F9="";A8;A8+1)"
End With
End Sub
Thanks in advance for any hints how to solve this issue!
Hagi