Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Move to next row
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? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Move to next row
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" wrote: 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? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Move to next row
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" wrote: 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" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I Move replace instead of Move copy | Excel Discussion (Misc queries) | |||
excel-how to get the spreadsheet to move as I move the scroll tab | Excel Discussion (Misc queries) | |||
Move to next row?? | Setting up and Configuration of Excel | |||
How do I stop making the spreadsht move when I move up/dwn/lt/rt? | Excel Worksheet Functions | |||
When I move scroll bar in excell the contents do not move with it | Excel Discussion (Misc queries) |