+ Reply to Thread
Results 1 to 7 of 7

Copying Rows from One Worksheet to Another

  1. #1
    Registered User
    Join Date
    11-12-2008
    Location
    camarillo
    Posts
    25

    Question Copying Rows from One Worksheet to Another

    Hey everyone! Is there a way to make a button or a check box in a row, that when clicked or checked, will copy that entire row's information into the next worksheet (for example, i have data from May that I need to copy to June)?

    Or can a drop-down be created in the June worksheet that has data from the May worksheet and when that data is selected, the entire row for that particular record will be copied over?

    Thanks,
    -Neil

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Copying Rows from One Worksheet to Another

    Hello there,

    Attached is a sample workbook with a command button that I believe achieves what you would like. What it does is copies the active cell's row and adds it to the first empty row in the worksheet Sheet2. To incorporate it into your workbook. Right click on the button in my workbook and select the copy option. Then paste it into your workbook. Right click on the newly inserted button in your workbook and select Assign Macro.

    Type the word test in the space provided for macro name (if there is anything in this box delete it) and then select the New option.

    Paste the following code between the Sub test() and End Sub

    Please Login or Register  to view this content.
    Anything that appears in green is a comment. Please take time to read through so that your sheet names are correct.

    Then exit out of VBA. Your button should now work.

    Let me know if this works for you or if you have any questions.

    Thanks!

    RVASQUEZ
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-12-2008
    Location
    camarillo
    Posts
    25

    Re: Copying Rows from One Worksheet to Another

    That worked great!! Thanks for the help. Much appreciated.

  4. #4
    Registered User
    Join Date
    11-12-2008
    Location
    camarillo
    Posts
    25

    Re: Copying Rows from One Worksheet to Another

    Oh hey, I did notice one problem though. When I tried to do the same thing on my worksheet, it seems to be overwriting the same row over and over. It's not skipping to the next empty row when I click the button again. Any thoughts?

  5. #5
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Copying Rows from One Worksheet to Another

    Are you adding it to column A?

  6. #6
    Registered User
    Join Date
    11-12-2008
    Location
    camarillo
    Posts
    25

    Re: Copying Rows from One Worksheet to Another

    Yea, I figured it out. I created a column for the button (which just happened to be column A) and that screwed it all up. I just put it at the very top of the worksheet and it works now. Thanks again!!

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Copying Rows from One Worksheet to Another

    No problem!

+ 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