Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy Cells - using Variable
I want to copy cells from one row to another using the row number and column
number of both source and destination. Example: copy FROM row 10 column 20 through row 10 column 30 TO row 100 column 50. This is a clarification to my previous post. I want to use a variable to do this. So 10, 20, 30, 50 and 100 will be variables. Can anyone provide the syntax for that? Thanks for any help on this. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy Cells - using Variable
Like this?
Sub copyvariablerows() fr = 10 fc = 20 fco = 30 dr = 100 dc = 50 Range(Cells(fr, fc), Cells(fr, fco)).Copy Cells(dr, dc) End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "dhstein" wrote in message ... I want to copy cells from one row to another using the row number and column number of both source and destination. Example: copy FROM row 10 column 20 through row 10 column 30 TO row 100 column 50. This is a clarification to my previous post. I want to use a variable to do this. So 10, 20, 30, 50 and 100 will be variables. Can anyone provide the syntax for that? Thanks for any help on this. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy Cells - using Variable
hi
another way?? Sub ctest() Dim r As Range Dim ro As Range Set r = Range(Cells(10, 20), Cells(10, 30)) Set ro = Cells(100, 50) r.Copy ro End Sub regards FSt1 "dhstein" wrote: I want to copy cells from one row to another using the row number and column number of both source and destination. Example: copy FROM row 10 column 20 through row 10 column 30 TO row 100 column 50. This is a clarification to my previous post. I want to use a variable to do this. So 10, 20, 30, 50 and 100 will be variables. Can anyone provide the syntax for that? Thanks for any help on this. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy Cells - using Variable
Thanks for the answers
"dhstein" wrote: I want to copy cells from one row to another using the row number and column number of both source and destination. Example: copy FROM row 10 column 20 through row 10 column 30 TO row 100 column 50. This is a clarification to my previous post. I want to use a variable to do this. So 10, 20, 30, 50 and 100 will be variables. Can anyone provide the syntax for that? Thanks for any help on this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy cells to variable number of rows | Excel Discussion (Misc queries) | |||
Copy By Variable | Excel Discussion (Misc queries) | |||
VBA help to copy variable range | Excel Discussion (Misc queries) | |||
copy formulas to cells absolute rows and variable columns | Excel Discussion (Misc queries) | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions |