Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveCell.FormulaR1C1: Getting Continuous Data

Status
Not open for further replies.

tudor30

Technical User
Jan 7, 2004
49
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
 
Yes, try using activecell.offset(1,0).select, although you should try to avoid selecting as it slows down the code
 
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
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top