Copy/Paste Column Issue Using a Range

A

ALATL

I am trying to copy several columns to a new worksheet. I have the following
code that does not copy the entire column correctly. It seems to copy only
cells C1 to C4. There are empty spaces in this column.

I would like for this to copy beginning at Org_Addr (this can be a variable
location) and all the way down to the last row of data in this column.

I appreciate the help!

ALATL

With SourceSheet
.Range(.Range(Org_Addr), .Range(Org_Addr).End(xlDown)).Copy
End With
DestSheet.[C65536].End(xlUp)(1).PasteSpecial Paste:=xlValues
 
J

JE McGimpsey

One way:

With SourceSheet
With .Range(.Range(Org_Addr), .Cells(.Rows.Count, _
.Range(Org_Addr).Column).End(xlUp))
DestSheet.Cells(.Rows.Count, 3).End(xlUp).Resize( _
.Rows.Count, .Columns.Count).Value = .Value
End With
End With
 
A

ALATL

It worked! However, I have no idea why. Can you do me a favor & put this into
English for me?

I appreciate your answer!

Best,
ALATL

JE McGimpsey said:
One way:

With SourceSheet
With .Range(.Range(Org_Addr), .Cells(.Rows.Count, _
.Range(Org_Addr).Column).End(xlUp))
DestSheet.Cells(.Rows.Count, 3).End(xlUp).Resize( _
.Rows.Count, .Columns.Count).Value = .Value
End With
End With





ALATL said:
I am trying to copy several columns to a new worksheet. I have the following
code that does not copy the entire column correctly. It seems to copy only
cells C1 to C4. There are empty spaces in this column.

I would like for this to copy beginning at Org_Addr (this can be a variable
location) and all the way down to the last row of data in this column.

I appreciate the help!

ALATL

With SourceSheet
.Range(.Range(Org_Addr), .Range(Org_Addr).End(xlDown)).Copy
End With
DestSheet.[C65536].End(xlUp)(1).PasteSpecial Paste:=xlValues
 

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

Top