Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default A simple copy problem

I need to copy a column of cells from one sheet to another. Like ...
Private Sub trycopy()
Worksheets("Sheet1").Range("E1:E17").Copy Destination:=ActiveCell
End Sub
The problem is, I only know the column number, not the letter. E = 5.
How can I do the copy using the column number, or alter the number to a
letter?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default A simple copy problem

Private Sub trycopy()
col = 5
Worksheets("Sheet1").cells(1,col).Resize(17,1).Cop y _
Destination:=ActiveCell
End Sub

--
Regards,
Tom Ogilvy

"Tim Coddington" wrote in message
...
I need to copy a column of cells from one sheet to another. Like ...
Private Sub trycopy()
Worksheets("Sheet1").Range("E1:E17").Copy Destination:=ActiveCell
End Sub
The problem is, I only know the column number, not the letter. E = 5.
How can I do the copy using the column number, or alter the number to a
letter?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default A simple copy problem - Thanks Tom!

Thanks Tom! Have never used .Resize. This will help in lots of ways!
"Tom Ogilvy" wrote in message
...
Private Sub trycopy()
col = 5
Worksheets("Sheet1").cells(1,col).Resize(17,1).Cop y _
Destination:=ActiveCell
End Sub

--
Regards,
Tom Ogilvy

"Tim Coddington" wrote in message
...
I need to copy a column of cells from one sheet to another. Like ...
Private Sub trycopy()
Worksheets("Sheet1").Range("E1:E17").Copy Destination:=ActiveCell
End Sub
The problem is, I only know the column number, not the letter. E = 5.
How can I do the copy using the column number, or alter the number to a
letter?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Line copy - Not just a simple copy paste Ninerref Excel Worksheet Functions 3 September 10th 09 11:44 AM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Copy & paste simple problem Paul Excel Programming 2 December 1st 04 10:10 PM
A simple problem... Chris Gorham[_3_] Excel Programming 2 December 24th 03 02:47 PM
Another simple little problem Jerry[_14_] Excel Programming 1 November 3rd 03 03:00 AM


All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"