Hi there
I am trying to write a simple For Next loop macro and cant seem to get it right. Once i have entered the data into the first cell, i want to be able to run the macro to enable me to complete all the calculations for the next 99 rows. Is there anyone that can help me please.
This is what i have tried so far:
Sub Loopmacro()
Dim i = integer
For = i
count = 1 to 100
Range("O2").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-14]"
Range("P2").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-14]"
Range("C3").Select
ActiveCell.FormulaR1C1 = "=RC[17]"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=R[1]C[13]"
Range("H3").Select
ActiveCell.FormulaR1C1 = "=R[2]C[12]"
Next i
End Sub
Any help would be greatful and any explanation as to why i am not getting the results i need
Many thanks in advance
Steve
I am trying to write a simple For Next loop macro and cant seem to get it right. Once i have entered the data into the first cell, i want to be able to run the macro to enable me to complete all the calculations for the next 99 rows. Is there anyone that can help me please.
This is what i have tried so far:
Sub Loopmacro()
Dim i = integer
For = i
count = 1 to 100
Range("O2").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-14]"
Range("P2").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-14]"
Range("C3").Select
ActiveCell.FormulaR1C1 = "=RC[17]"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=R[1]C[13]"
Range("H3").Select
ActiveCell.FormulaR1C1 = "=R[2]C[12]"
Next i
End Sub
Any help would be greatful and any explanation as to why i am not getting the results i need
Many thanks in advance
Steve