Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Copy/Paste Column Issue Using a Range

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Copy/Paste Column Issue Using a Range

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





In article ,
ALATL wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Copy/Paste Column Issue Using a Range

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" wrote:

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





In article ,
ALATL wrote:

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


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
VBA Copy Paste Issue jlclyde Excel Discussion (Misc queries) 0 January 21st 10 05:53 PM
A macro to copy & paste many rows (a range) to the next column .. genehunter New Users to Excel 11 April 21st 09 07:36 AM
Copy & Paste Issue carrera0000 Excel Discussion (Misc queries) 3 August 17th 07 02:24 AM
Copy Paste issue amwebber Excel Worksheet Functions 3 October 31st 06 02:08 AM
Issue with copy & paste? Etrnal168 Excel Discussion (Misc queries) 2 July 12th 05 03:35 AM


All times are GMT +1. The time now is 04:00 PM.

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"