Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Copy Paste Issue | Excel Discussion (Misc queries) | |||
A macro to copy & paste many rows (a range) to the next column .. | New Users to Excel | |||
Copy & Paste Issue | Excel Discussion (Misc queries) | |||
Copy Paste issue | Excel Worksheet Functions | |||
Issue with copy & paste? | Excel Discussion (Misc queries) |