+ Reply to Thread
Results 1 to 4 of 4

The information cannot be pasted because the copy area and the paste area are not...

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    The information cannot be pasted because the copy area and the paste area are not...

    Hey all,

    If a cell in column O has content, I want to append to bottom of column N. Problem is below VBA throws error "The information cannot be pasted because the copy area and the paste area are not the same shape and size".

    Please Login or Register  to view this content.
    It's that "EntireRow" part that is causing it. Problem is if I remove it, then if column N contains content in a cell, and O is supposed to paste to that cell, O will not be paste because I dont want to override existing content. I just want to find an existing cell in N that contains nothing and copy there.

    Thanks for response.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: The information cannot be pasted because the copy area and the paste area are not

    You shouldn't be copying ENTIREROWs unless you really want to paste entire rows. Typically, an entirerow command it targeted at a cell in column A, yes? Else, where are the leftover cells at the end of the "entirerow.copy" command supposed to go when you bump off the end of the row? That's what's causing the error.

    If your design doesn't support your need, post your workbook demonstrating some BEFORE/AFTER examples so we can see what you really need, visually.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: The information cannot be pasted because the copy area and the paste area are not

    I do want to take the entire row of P and stick it below O. I just don't know how to do it that way because O will have empty cells but there will be cells with content after those empty ones. So I will never know which is last cell in O just by checking if a specific cell is empty or not, because if it is empty, that doesnt necessarily mean that it is the last. I also dont want to override any cells with content in O but I want to also ensure all the Ps end up in O. It is really something simple I am trying to do:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    The results after the macro:

    Please Login or Register  to view this content.
    Last edited by johnmerlino; 05-12-2011 at 10:14 PM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: The information cannot be pasted because the copy area and the paste area are not

    YOu talk about copying entire rows and then post an example showing single cells from column P being pasted below the current data in column O, nothing to do with entire rows at all.

    This is why I told you to post an example workbook showing the full scope of what you wanted to do. IF the full scope is really as simple as:

    "Move the data in column P to the bottom of the data in column O preserving any blank spaces in the layout."


    ...that's way simpler than the code you've got.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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