Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy a range with known start column to variable end column
Dear All,
Within a loop, I want to copy a range of values then paste to another range. I don't know the syntax to write a variable into the range address. activesheet.range("myVariableCol myVarRow", "myVarCol myVarRow").copy_ otherSheet.range("myVarCol myVarRow") is what I am trying to achieve. - The two positions are in the same absolute address in both sheets. Any help appreciated, Matilda |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy a range with known start column to variable end column
Use it like this
For testing it select the range myVarRow1 = 2 myVariableCol1 = 1 myVarRow2 = 10 myVariableCol2 = 3 Range(Cells(myVarRow1, myVariableCol1), Cells(myVarRow2, myVariableCol2)).Select -- Regards Ron de Bruin http://www.rondebruin.nl "Matilda" wrote in message ... Dear All, Within a loop, I want to copy a range of values then paste to another range. I don't know the syntax to write a variable into the range address. activesheet.range("myVariableCol myVarRow", "myVarCol myVarRow").copy_ otherSheet.range("myVarCol myVarRow") is what I am trying to achieve. - The two positions are in the same absolute address in both sheets. Any help appreciated, Matilda |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy a range with known start column to variable end column
I get it! Many thanks Ron
"Ron de Bruin" wrote: Use it like this For testing it select the range myVarRow1 = 2 myVariableCol1 = 1 myVarRow2 = 10 myVariableCol2 = 3 Range(Cells(myVarRow1, myVariableCol1), Cells(myVarRow2, myVariableCol2)).Select -- Regards Ron de Bruin http://www.rondebruin.nl "Matilda" wrote in message ... Dear All, Within a loop, I want to copy a range of values then paste to another range. I don't know the syntax to write a variable into the range address. activesheet.range("myVariableCol myVarRow", "myVarCol myVarRow").copy_ otherSheet.range("myVarCol myVarRow") is what I am trying to achieve. - The two positions are in the same absolute address in both sheets. Any help appreciated, Matilda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum values in a column depending on start time in another column | New Users to Excel | |||
Excel sum with variable start column | Excel Worksheet Functions | |||
Concatenate column with variable to set a range | Excel Discussion (Misc queries) | |||
Using a Macro to Sum a Variable-Length Range (a Column) | Excel Programming | |||
Determine start column/ end column of Merged Cell | Excel Programming |