PC Review


Reply
Thread Tools Rate Thread

Copying an unspecified column range

 
 
jhong
Guest
Posts: n/a
 
      9th Jul 2008
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
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      9th Jul 2008
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" <(E-Mail Removed)> skrev i meddelelsen
news:980a9360-804f-412a-8f27-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      9th Jul 2008
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 <(E-Mail Removed)> 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


 
Reply With Quote
 
jhong
Guest
Posts: n/a
 
      11th Jul 2008
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 <jerome.tam...@gmail.com> 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!!

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      11th Jul 2008
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 <(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which is faster, copying range to another set of ranges or copying tomemory? axwack Microsoft Excel Programming 2 12th Dec 2007 01:19 PM
macro for copying a range to a column of cells aide.morcam@gmail.com Microsoft Excel Programming 2 9th Jun 2006 01:06 AM
How a macro auto-determine unspecified range eric c Microsoft Excel Programming 1 26th Oct 2004 07:49 PM
Transfering VBA Array Column Range to Excel Column Range ExcelMonkey Microsoft Excel Programming 5 22nd Jan 2004 05:57 PM
copying range column widths =?Utf-8?B?cmV4c2FsaXVz?= Microsoft Excel Programming 2 14th Jan 2004 07:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:29 AM.