ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying Column in R1C convention (https://www.excelbanter.com/excel-programming/383585-copying-column-r1c-convention.html)

Barb Reinhardt

Copying Column in R1C convention
 
I know I want to copy column N on a specific worksheet name where N is
variable and is a number (column 2, 5, 8, whatever). How do I write the
code to copy that column?

Thanks,

dkinn

Copying Column in R1C convention
 
assuming you want to copy the entire column from the activeworksheet

n = 3
Columns(n).Copy

or

n = 3
Sheets("Sheet2").Columns(n).Copy

if it is not the active sheet

or you could add workbooks("bookname") if it is in another workbook

hope this helps

David
"Barb Reinhardt" wrote:

I know I want to copy column N on a specific worksheet name where N is
variable and is a number (column 2, 5, 8, whatever). How do I write the
code to copy that column?

Thanks,



All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com