Copying an unspecified column range

  • Thread starter Thread starter jhong
  • Start date Start date
J

jhong

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
 
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
 
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
 
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








- 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!!
 
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
 

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