+ Reply to Thread
Results 1 to 4 of 4

=?Utf-8?Q?Error_=E2=80=9CThis_operation_requires_t?==?Utf-8?Q?he_merged_cells_to_be_identicall?==?Utf-8?Q?y?=

  1. #1
    ca1358
    Guest

    =?Utf-8?Q?Error_=E2=80=9CThis_operation_requires_t?==?Utf-8?Q?he_merged_cells_to_be_identicall?==?Utf-8?Q?y?=

    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. #2
    Alok
    Guest

    =?Utf-8?Q?RE:_Error_=E2=80=9CThis_operation_requir?==?Utf-8?Q?es_the_merged_cells_to_be_identi?==?Utf-8?Q?cally?=

    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. #3
    ca1358
    Guest

    =?Utf-8?Q?RE:_Error_=E2=80=9CThis_operation_requir?==?Utf-8?Q?es_the_merged_cells_to_be_identi?==?Utf-8?Q?ca?=

    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. #4
    Tom Ogilvy
    Guest

    Re: 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" <ca1358@discussions.microsoft.com> wrote in message
    news:249D1CAA-DBD1-4311-9D44-ED3B8BEF23AA@microsoft.com...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1