Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Copy & Paste (Merged & Centered)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cathy - 23 Feb 2006 10:51 GMT
In Sheet1, I have Cells A1:D1 "Merged & Centered" with bold letters for
the title of the page

I am trying to write a macro top copy and Paste the Text from A1:C1 to
Sheet2!D2 (after inserting a new column in D2)

The problem is that after pasting in D2, the contents of E2 and F2 are
also cleared as it seems because the copied area is merged over three
cells, the pasted area is pasted over three cells.

Is there a way I could make this only Paste in Cell D2

For reference, this is what I am using:
Sheets("Sheet1").Select
   Range("A1").Select
   Selection.Copy
   Sheets("Sheet2").Select
   Range("D2").Select
   Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
       False, Transpose:=False

Thanks in advance

Cathy
Dave Peterson - 23 Feb 2006 15:45 GMT
Maybe just assigning the value would work better:

   Worksheets("sheet2").Range("D2").Value _
       = Worksheets("sheet1").Range("a1").Value

> In Sheet1, I have Cells A1:D1 "Merged & Centered" with bold letters for
> the title of the page
[quoted text clipped - 21 lines]
>
> Cathy

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.