Move to next row

U

Unique713

Is there any way to to change this macro so that every time it is run the row
is changed? Here is the macro:

Range("C1").Select
ActiveCell.FormulaR1C1 = "=Master!R[3]C"

When this is run the next time i want the 3 to be a 4. And then the next
time I want the 4 to be a 5. Is this possible?
 
L

Luke M

You could use a helper cell.
something like

Dim xCount as Integer
xCount = Range("A1").value 'where A1 has initially been set to 3
Range("C1").Select
ActiveCell.FormulaR1C1 = "=Master!R["&xCount&"]C"
Range("A1").value = Range("A1").value + 1

Of course, you could use any cell, on any sheet you want as a helper cell.
 
U

Unique713

I am very new to macros so I am a little confused. Where you put the x would
be the number of rows I want it to move everytime the macro is run? Does the
"A1" range value equal the cell that i want the information placed in? With
the value portion on the bottom, wont that just add to the figure in the cell
(if the value of the cell is 4 wont it make it 5)?

Luke M said:
You could use a helper cell.
something like

Dim xCount as Integer
xCount = Range("A1").value 'where A1 has initially been set to 3
Range("C1").Select
ActiveCell.FormulaR1C1 = "=Master!R["&xCount&"]C"
Range("A1").value = Range("A1").value + 1

Of course, you could use any cell, on any sheet you want as a helper cell.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


Unique713 said:
Is there any way to to change this macro so that every time it is run the row
is changed? Here is the macro:

Range("C1").Select
ActiveCell.FormulaR1C1 = "=Master!R[3]C"

When this is run the next time i want the 3 to be a 4. And then the next
time I want the 4 to be a 5. Is this possible?
 
Top