Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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
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
macro for copying a range to a column of cells [email protected] Excel Programming 2 June 9th 06 01:06 AM
Unspecified Automation Error _Yoyo Excel Discussion (Misc queries) 0 May 20th 05 09:16 PM
Unspecified Automation Error _Yoyo Excel Discussion (Misc queries) 0 May 20th 05 02:06 PM
How a macro auto-determine unspecified range eric c Excel Programming 1 October 26th 04 07:49 PM
copying range column widths rexsalius Excel Programming 2 January 14th 04 07:07 PM


All times are GMT +1. The time now is 10:32 AM.

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"