A simple copy problem

  • Thread starter Thread starter Tim Coddington
  • Start date Start date
T

Tim Coddington

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?
 
Private Sub trycopy()
col = 5
Worksheets("Sheet1").cells(1,col).Resize(17,1).Copy _
Destination:=ActiveCell
End Sub
 
Thanks Tom! Have never used .Resize. This will help in lots of ways!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top