Jagwarman
asked on
Loop Code
I have the below code which I need to copy 23 times
Range("G5").Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[1]C[1]"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[1]C[1]"
etc
etc
then offset by 5 and do the next piece of code 23 times
ActiveCell.Offset(5, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[-26]C[3]"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[-26]C[3]"
Instead of copying this code 23 times for each can an expert show me how to loop this please.
Range("G5").Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[1]C[1]"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[1]C[1]"
etc
etc
then offset by 5 and do the next piece of code 23 times
ActiveCell.Offset(5, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[-26]C[3]"
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "='Data Dashboard'!R[-26]C[3]"
Instead of copying this code 23 times for each can an expert show me how to loop this please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER