Jun 8, 2004 #1 tudor30 Technical User Joined Jan 7, 2004 Messages 49 Location US Is there a method to use the following statement so that in a Loop it locates the next row down. example !R11C2, then !R12C2,...and so on? ActiveCell.FormulaR1C1 = "='[S350 T3 PLPDP.xls]Master Tracking'!R10C2
Is there a method to use the following statement so that in a Loop it locates the next row down. example !R11C2, then !R12C2,...and so on? ActiveCell.FormulaR1C1 = "='[S350 T3 PLPDP.xls]Master Tracking'!R10C2
Jun 8, 2004 #2 Molby Technical User Joined May 15, 2003 Messages 520 Location GB Yes, try using activecell.offset(1,0).select, although you should try to avoid selecting as it slows down the code Upvote 0 Downvote
Yes, try using activecell.offset(1,0).select, although you should try to avoid selecting as it slows down the code
Jun 8, 2004 Thread starter #3 tudor30 Technical User Joined Jan 7, 2004 Messages 49 Location US How is that used to move to the next row down from '[S350 T3 PLPDP.xls]Master Tracking'!R10C2" so that it selects the value in R11C2 Upvote 0 Downvote
How is that used to move to the next row down from '[S350 T3 PLPDP.xls]Master Tracking'!R10C2" so that it selects the value in R11C2
Jun 8, 2004 #4 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US Code: nvalue = Workbooks("S350 T3 PLPDP.xls").Worksheets("Master Tracking").Cells(10, 2).offset(1,0).value Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Code: nvalue = Workbooks("S350 T3 PLPDP.xls").Worksheets("Master Tracking").Cells(10, 2).offset(1,0).value Skip, Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
Jun 8, 2004 #5 Molby Technical User Joined May 15, 2003 Messages 520 Location GB Sorry didn't read it properly. This hasn't been tested, but something like: Code: sub test r$ = 10 do until r$ = 200 activecell.offset(r$,0).value "= '[S350 T3 PLPDP.xls]Master Tracking'!R" & r$ & "C2" r$ = r$+1 Loop End sub Replace the 200 value with the value you want. This way there is no selecting of cells and it will keep moving down. Upvote 0 Downvote
Sorry didn't read it properly. This hasn't been tested, but something like: Code: sub test r$ = 10 do until r$ = 200 activecell.offset(r$,0).value "= '[S350 T3 PLPDP.xls]Master Tracking'!R" & r$ & "C2" r$ = r$+1 Loop End sub Replace the 200 value with the value you want. This way there is no selecting of cells and it will keep moving down.