using a variable as cell reference?

Joined
Jul 30, 2007
Messages
1
Reaction score
0
Hi!
This is my task,really simple but I'm struggling with it:
Simply put: I have a cell of data in every 8th row of Sheet1 that I need to copy onto Sheet2's consecutive rows, that is if the data is in cells B10,B18,B26 to B(Whatever), I need the data to go on Sheet2 into cells B10,B11,B12 to B(Whatever/8). I've tried using a VBA loop to do this using this type of command:

ActiveCell.FormulaR1C1 = "='Sheet1!RC[-1]"

However, I would need to use a variable instead of the [-1] there, so I can put the whole thing into a "For" loop and make it move 8 cells down on Sheet1 but only 1 cell down on Sheet2. (Also, I need on Sheet2 as link to the first sheet, not just value). This just doesn't seem to work and returns an error, so I think either my syntax is wrong or I need something completely different for this task.
If anybody has any ideas, I would greatly appreciate it as it's going to save me long hours (or days!) of tediously linking the sheets manually!

Thanks

Peter
 

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

Back
Top