Simple loop with a 4+ add on.

G

Guest

I have simple macro but I'm not that good with VB code. This is what I have:
ActiveCell.FormulaR1C1 = "=RC[-25]"
Range("AC10").Select
ActiveCell.FormulaR1C1 = "=RC[-25]"
Range("AD10").Select
ActiveCell.FormulaR1C1 = "=RC[-24]"
Range("AE10").Select
ActiveCell.FormulaR1C1 = "=RC[-21]"
Range("AF10").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-22]"
Range("AG10").Select
ActiveCell.FormulaR1C1 = "=R[2]C[-23]"
Range("AH10").Select
ActiveCell.FormulaR1C1 = "=R[3]C[-24]"
Range("AB10:AH10").Select
Selection.Copy
Range("AB14").Select
ActiveSheet.Paste
Range("AB18").Select
ActiveSheet.Paste
Range("AB22").Select
ActiveSheet.Paste
Range("AB26").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AB10").Select
End Sub

What I like to do is run a loop. From the start point, I move down 4 rows
and paste my function and then I go down 4 rows and paste.
Thanks
 
G

Guest

I believe that you posted this to the wrong forum. Looks like Excel to me and
this is an Access database forum.
 
G

Guest

Thanks

Jerry Whittle said:
I believe that you posted this to the wrong forum. Looks like Excel to me and
this is an Access database forum.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

pgarcia said:
I have simple macro but I'm not that good with VB code. This is what I have:
ActiveCell.FormulaR1C1 = "=RC[-25]"
Range("AC10").Select
ActiveCell.FormulaR1C1 = "=RC[-25]"
Range("AD10").Select
ActiveCell.FormulaR1C1 = "=RC[-24]"
Range("AE10").Select
ActiveCell.FormulaR1C1 = "=RC[-21]"
Range("AF10").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-22]"
Range("AG10").Select
ActiveCell.FormulaR1C1 = "=R[2]C[-23]"
Range("AH10").Select
ActiveCell.FormulaR1C1 = "=R[3]C[-24]"
Range("AB10:AH10").Select
Selection.Copy
Range("AB14").Select
ActiveSheet.Paste
Range("AB18").Select
ActiveSheet.Paste
Range("AB22").Select
ActiveSheet.Paste
Range("AB26").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("AB10").Select
End Sub

What I like to do is run a loop. From the start point, I move down 4 rows
and paste my function and then I go down 4 rows and paste.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top