Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying an unspecified column range
Hi,
Need help from you Guys. I want to create a personal macro that will copy a range from the active cell down below (more likely up to 400 rows). I need your code / help very badly. Thanks in advance. Jerome |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying an unspecified column range
Hi Jerome
One column Range(ActiveCell, ActiveCell.End(xlDown)).copy or if you want to copy all column in the range Range(ActiveCell, ActiveCell.End(xlDown)).EntireRow.copy Regards, Per "jhong" skrev i meddelelsen ... Hi, Need help from you Guys. I want to create a personal macro that will copy a range from the active cell down below (more likely up to 400 rows). I need your code / help very badly. Thanks in advance. Jerome |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying an unspecified column range
Copy to where?
Sub copy_column() Dim rng2 As Range Set rng2 = Sheets("Sheet2").Range("A1") Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column) _ .End(xlUp)).Copy Destination:=rng2 End Sub Best to select from bottom up in case there blank cells in the range. xlDown will stop at first blank cell. Gord Dibben MS Excel MVP On Wed, 9 Jul 2008 01:03:27 -0700 (PDT), jhong wrote: Hi, Need help from you Guys. I want to create a personal macro that will copy a range from the active cell down below (more likely up to 400 rows). I need your code / help very badly. Thanks in advance. Jerome |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying an unspecified column range
On Jul 10, 6:37*am, Gord Dibben <gorddibbATshawDOTca wrote:
Copy to where? Sub copy_column() Dim rng2 As Range * * Set rng2 = Sheets("Sheet2").Range("A1") * * * *Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column) _ * * .End(xlUp)).Copy Destination:=rng2 End Sub Best to select from bottom up in case there blank cells in the range. xlDown will stop at first blank cell. Gord Dibben *MS Excel MVP On Wed, 9 Jul 2008 01:03:27 -0700 (PDT), jhong wrote: Hi, Need help from you Guys. I want to create a personal macro that will copy a range from the active cell down below (more likely up to 400 rows). I need your code / help very badly. Thanks in advance. Jerome- Hide quoted text - - Show quoted text - Thanks a lot Jessen and Gord for the reply! Here's the code that i need coming from Gord, Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy Kudos to both of you!! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying an unspecified column range
Now that you have copied the range, what will you do with it?
You don't always have to select something to copy or move it. But if you're happy with what you've got.........OK Thanks for the feedback Gord On Fri, 11 Jul 2008 06:00:15 -0700 (PDT), jhong wrote: Thanks a lot Jessen and Gord for the reply! Here's the code that i need coming from Gord, Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy Kudos to both of you!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro for copying a range to a column of cells | Excel Programming | |||
Unspecified Automation Error | Excel Discussion (Misc queries) | |||
Unspecified Automation Error | Excel Discussion (Misc queries) | |||
How a macro auto-determine unspecified range | Excel Programming | |||
copying range column widths | Excel Programming |