PC Review


Reply
Thread Tools Rate Thread

Copying Column in R1C convention

 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      20th Feb 2007
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,
 
Reply With Quote
 
 
 
 
=?Utf-8?B?ZGtpbm4=?=
Guest
Posts: n/a
 
      20th Feb 2007
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,

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET: Naming convention for a column with "AS" in stored procedure Fir5tSight Microsoft Dot NET 2 8th Jan 2007 08:50 PM
Copying a formula in a blank column as far as data in previous column basildon Microsoft Excel Programming 1 16th Dec 2005 03:32 PM
Anyway to set numerical column name as Exel convention? =?Utf-8?B?RnJhbmsgQ2Fv?= Microsoft Excel Worksheet Functions 4 15th Dec 2005 08:02 PM
Naming convention for a variable "Book1" while copying sheets JER Microsoft Excel Programming 6 3rd Apr 2004 08:54 PM
copying the column of the active cell to another column Paul James Microsoft Excel Programming 2 26th Feb 2004 08:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 AM.