+ Reply to Thread
Results 1 to 8 of 8

Copy selected cells to end of row in another worksheet

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2010
    Posts
    4

    Angry Copy selected cells to end of row in another worksheet

    I am trying to figure out the code to copy selected cells on a worksheet and then paste the selected cells to the last row in another worksheet in the same workbook. The worksheet that I am copying from will have an employees name, such as Mary, and the selected cells will be paste to a worksheet called Current Projects. I was able to get the paste part to work, but it is only copying the first cell on the employee worksheet & pasting the same information for all the cells. Any help would be greatly appreciated.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy selected cells to end of row in another worksheet

    Welcome to the Forum. It would be good if you attach a sample workbook along with the code you are using so we can help you better.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-02-2012
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy selected cells to end of row in another worksheet

    Here is a copy of the Excel workbook.
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy selected cells to end of row in another worksheet

    Would you/user select the cells which need to be copied? Or should the macro select certain cells based on a condition?

  5. #5
    Registered User
    Join Date
    01-02-2012
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy selected cells to end of row in another worksheet

    the user would select the cells that need to be copied

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy selected cells to end of row in another worksheet

    All you need is 1 line of code -
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-02-2012
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy selected cells to end of row in another worksheet

    This works! Thanks so much. Of course, thinks have change & I know need to have the line that is being copied deleted once it is moved to the current projects tab. Any suggestions?

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy selected cells to end of row in another worksheet

    You have 2 options in hand -
    1. Use cut paste and not copy paste. This will give you blanks that you need to go back to the sheet and delete. OR
    2. Use cut paste and then sort the sheet where you cut from to get rid of the blanks.

    If you choose option 1 - your code will be -
    Please Login or Register  to view this content.
    Code for option 2 is -
    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)

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