Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Error This operation requires the merged cells to be identically

I have (A) spreadsheet that has a template with 3 merged cells,

So I made a 2nd (B) spreadsheet with same template.

Set up code to copy a line from (A) and paste to (B) but I get an error

This operation requires the merged cells to be identically sized. .

Both sheets are identical. Can someone tell me how to get around this?


--
ca1358
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Error This operation requires the merged cells to be identically

Can you please submit the code you are using?

Alok

"ca1358" wrote:

I have (A) spreadsheet that has a template with 3 merged cells,

So I made a 2nd (B) spreadsheet with same template.

Set up code to copy a line from (A) and paste to (B) but I get an error

This operation requires the merged cells to be identically sized. .

Both sheets are identical. Can someone tell me how to get around this?


--
ca1358

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Error This operation requires the merged cells to be identica

It stops at this line in the sub and gives me the error.
rngToPaste.PasteSpecial xlPasteValues


Private Sub cmdGN15Data1_Click()
Dim rngToCopy As Range
Dim rngToPaste As Range
Dim wksToPaste As Worksheet

Set rngToCopy = Sheets("GN15").Range("A28:v28")
Set wksToPaste = Sheets("TempTable")
Set rngToPaste = wksToPaste.Cells(Rows.Count, _
"A").End(xlUp).Offset(1, 0)

rngToCopy.Copy
wksToPaste.Unprotect "Cubs1908"
rngToPaste.PasteSpecial xlPasteValues
wksToPaste.Protect "Cubs1908"

Application.CutCopyMode = False
--
ca1358


"Alok" wrote:

Can you please submit the code you are using?

Alok

"ca1358" wrote:

I have (A) spreadsheet that has a template with 3 merged cells,

So I made a 2nd (B) spreadsheet with same template.

Set up code to copy a line from (A) and paste to (B) but I get an error

This operation requires the merged cells to be identically sized. .

Both sheets are identical. Can someone tell me how to get around this?


--
ca1358

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error "This operation requires the merged cells to be identica

Try changing it to:

' rngToCopy.Copy
wksToPaste.Unprotect "Cubs1908"
rngToPaste.Resize(rngTocopy.Rows.count, _
rngToCopy.columns.count).Value = rngTocopy
wksToPaste.Protect "Cubs1908"

--
Regards,
Tom Ogilvy

"ca1358" wrote in message
...
It stops at this line in the sub and gives me the error.
rngToPaste.PasteSpecial xlPasteValues


Private Sub cmdGN15Data1_Click()
Dim rngToCopy As Range
Dim rngToPaste As Range
Dim wksToPaste As Worksheet

Set rngToCopy = Sheets("GN15").Range("A28:v28")
Set wksToPaste = Sheets("TempTable")
Set rngToPaste = wksToPaste.Cells(Rows.Count, _
"A").End(xlUp).Offset(1, 0)

rngToCopy.Copy
wksToPaste.Unprotect "Cubs1908"
rngToPaste.PasteSpecial xlPasteValues
wksToPaste.Protect "Cubs1908"

Application.CutCopyMode = False
--
ca1358


"Alok" wrote:

Can you please submit the code you are using?

Alok

"ca1358" wrote:

I have (A) spreadsheet that has a template with 3 merged cells,

So I made a 2nd (B) spreadsheet with same template.

Set up code to copy a line from (A) and paste to (B) but I get an

error

"This operation requires the merged cells to be identically sized." .

Both sheets are identical. Can someone tell me how to get around this?


--
ca1358



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
sorting problems - error message: identically sized merged cells. 4markw Excel Discussion (Misc queries) 2 January 5th 10 06:28 PM
Operation requires the merged cells to be identically sized David Excel Worksheet Functions 1 November 11th 09 06:41 AM
Odd error - "This operation requires merged cells..." Maury Markowitz New Users to Excel 3 September 14th 06 01:54 AM
Error This operation requires the merged cells to be identically ca1358 Excel Programming 0 November 30th 05 09:57 PM
requires that merged cells must be identically sized? Catt Excel Discussion (Misc queries) 11 July 3rd 05 12:36 PM


All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"