Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Line copy - Not just a simple copy paste | Excel Worksheet Functions | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Copy & paste simple problem | Excel Programming | |||
A simple problem... | Excel Programming | |||
Another simple little problem | Excel Programming |