Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The last line of this code, the paste line, errors out. Both named ranges are
identically formated cols B-H on two different sheets, but the ranges have different numbers of rows. I'm trying to a copy a selected row from NamedRange1 to the second row of NamedRange2. Application.CutCopyMode = False Sheets("Sheet1").Range("NamedRange1").Rows(j).Copy Sheets("Sheet2").Select Sheets("Sheet2").Range("NamedRange2").Rows(2).Past e I appreciate your help, -John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You do not need to select sheet 2 if you use the direct copy method. This
would normally all be on one line of code. The sibscript line attenuator makes the two lines below behave as one. Sheets("Sheet1").Range("NamedRange1").Rows(j).Copy _ Sheets("Sheet2").Range("NamedRange2").Rows(2) The syntax you were using for Paste will not work with the Rows collection object. You would have to use PasteSpecial with arguments to make it work that way. "John" wrote: The last line of this code, the paste line, errors out. Both named ranges are identically formated cols B-H on two different sheets, but the ranges have different numbers of rows. I'm trying to a copy a selected row from NamedRange1 to the second row of NamedRange2. Application.CutCopyMode = False Sheets("Sheet1").Range("NamedRange1").Rows(j).Copy Sheets("Sheet2").Select Sheets("Sheet2").Range("NamedRange2").Rows(2).Past e I appreciate your help, -John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy, Paste and Print Cells from a Named Range | Excel Programming | |||
Copy & Paste Named Range Contents | Excel Programming | |||
After Copy and Paste, Add to an Existing Named Range | Excel Programming | |||
Copy and Paste 2 columns from a named range? | Excel Programming |