Hi, im starting to use vba to create a macro that do this:
I have a worksheet named "gironi" and i need to take value of cell R5, R14, R23 and so on with increment of 9 and display these value with this logic:
r5 into a1
r14 into b1
r23 into a2
r32 into b2
r41 into a3
r50 into b4
and so on...
I produce this (that obviosly you can image not work):
Dim i
Dim Inizio
Inizio = 5
For i = 1 To 16
Tinizio = Str(Inizio)
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
Range("C4").Select
Inizio = Inizio + 9
Tinizio = Str(Inizio)
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
Next i
End Sub
I have error on these lines:
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
How can i format in order to work?
Thanks for help!!
Fabio
I have a worksheet named "gironi" and i need to take value of cell R5, R14, R23 and so on with increment of 9 and display these value with this logic:
r5 into a1
r14 into b1
r23 into a2
r32 into b2
r41 into a3
r50 into b4
and so on...
I produce this (that obviosly you can image not work):
Dim i
Dim Inizio
Inizio = 5
For i = 1 To 16
Tinizio = Str(Inizio)
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
Range("C4").Select
Inizio = Inizio + 9
Tinizio = Str(Inizio)
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
Next i
End Sub
I have error on these lines:
ActiveCell.FormulaR1C1 = "=gironi!R[" & Tinizio & "]C[15]"
How can i format in order to work?
Thanks for help!!
Fabio