paste into merged cells

davidam

Active Member
Joined
May 28, 2010
Messages
474
Office Version
  1. 2021
Platform
  1. Windows
This code caused a run time error 1004: paste method of worksheet class failed:
Code:
Range("N1").Copy
ActiveSheet.Paste Destination:=Range("AA58")
AA58 is actually the leftmost cell of some merged cells; I changed it to the following
Code:
Range("N1").Copy
Range("AA58").Select
ActiveSheet.Paste
and it runs fine.
My question is this: is there a way to paste into the merged cells without selecting them?
Thanks
David
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
When dealing with merged cells, best to use the .value method:

Code:
Range("AA58").Value = Range("N1").Value
 
Upvote 0
will this create a link or just copy the value?
 
Upvote 0
The following should also work.

Gary

Code:
Range("N1").Copy
ActiveSheet.Paste Destination:=Range("AA58").MergeArea
 
Upvote 0
Please allow me to withdraw the previous dumb response. I tried your suggestion and it worked beautifully.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top