I would like to make a flexible macro that uses the formula in row 3 of a column to calculate the results of row 5 to last (32333 f.e.)
This is my code so far:
Sub formuletest()
Rijen = Range("AS1").Value
kolom = Range("AS2").Value
formule = Range("AS3").Formula
For i = 5 To Rijen
T_lu = Range("M" & i).Value
Worksheets(1).Cells(i, kolom).Value = formule
Next i
End Sub
formula in AS3 is =polynome(T_lu) and it is already made in VBA.
in my code in row 7 I get:
Worksheets(1).Cells(i, kolom).Value = "=polynome(T_lu)" whitch doesn't do the trick...
It would be nice if this could be any formula that I write in AS3
Thanx
Martijn
This is my code so far:
Sub formuletest()
Rijen = Range("AS1").Value
kolom = Range("AS2").Value
formule = Range("AS3").Formula
For i = 5 To Rijen
T_lu = Range("M" & i).Value
Worksheets(1).Cells(i, kolom).Value = formule
Next i
End Sub
formula in AS3 is =polynome(T_lu) and it is already made in VBA.
in my code in row 7 I get:
Worksheets(1).Cells(i, kolom).Value = "=polynome(T_lu)" whitch doesn't do the trick...
It would be nice if this could be any formula that I write in AS3
Thanx
Martijn