+ Reply to Thread
Results 1 to 5 of 5

pastespecial to first blank row in range

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    pastespecial to first blank row in range

    My current code works great for "column A" (code attached), but not so great for "column Y" (code also attached). The error is for run time error 1004 (copy and paste not same size). Column A will be empty for this code so it's not an option. Also there is other data, not related above and below my range of 3000-3111 so......... I can't seem to get it to work properly. Any help is greatly appreciated.
    this one works
    Please Login or Register  to view this content.
    This one doesn't
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: pastespecial to first blank row in range

    Please Login or Register  to view this content.
    It's copying an entire row, then trying to paste the row starting at column Y. An entire row wouldn't fit starting at column Y as it does with column A.

    Try something like this, though I don't fully appreciate what the ultimate goal is.
    Please Login or Register  to view this content.
    Note: this would still error if there were no blanks within the destination range.
    Last edited by AlphaFrog; 06-07-2013 at 12:31 AM.

  3. #3
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: pastespecial to first blank row in range

    Thanks AlphaFrog. That works better, but it is not copying the entire row. Essentially, the goal is to look up info from inputbox (which is located in column "y") and copy and paste the entire row to sheets "template". It populates a list with checkboxes to select which row the user wants to use on sheets "Template". Note that the first few columns (up to column "Q" in "Contacts) do not have any relevant info in them (they may or may not be populated). They may, but it is not relevant. I need the info from column "R" through column "AA" to be pasted.

    Thank you for your help.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: pastespecial to first blank row in range

    This would Copy\Paste the entire row.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Omaha, Nebraska
    MS-Off Ver
    2010
    Posts
    39

    Re: pastespecial to first blank row in range

    Thank you very much. That got it!

+ 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