Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Copying data
Copying data
Resolved · High Priority · Version 2007
Copying data
What is the code for copying data from a cell down to the point where the data in the cell to the left stops.I have data in cells C12 to C50 I need to write a code to copy the formula i have in cell D12 to D50
The number of rows that has the data will change every time i run the macro so i need to copy the data down as far as required.(i.e not down to row 50 every time)
Thanks
Lee
For upcoming training course dates see: Pricing & availability
RE: Copying data
Hi LeeThanks for the question
I would create an uinteger variable and set it equal to the rows count of the current region of the first cell in the column.
introws = range("A1").currentregion.rows.countyou could then use a For loop to start at row one and go to the final row as determined above. At each point in the loop you could write in the formula
Regards
Stephen
|
|
» Forum post: Connectors |



Course updates

