+ Reply to Thread
Results 1 to 5 of 5

Copy rows to existing sheet by any value in E to Done sheet

  1. #1
    Registered User
    Join Date
    10-06-2015
    Location
    USA
    MS-Off Ver
    07
    Posts
    3

    Question Copy rows to existing sheet by any value in E to Done sheet

    I've been working on this for weeks with no luck. I need a macro that when you click a button or rectangle will copy any rows that have a value in the E column to the Done sheet, the first empy row. It needs to work with any active sheet name. and it needs to copy to the bottom of the Done sheet.

    Daily Shop Planner Work Order Log Master xlsx.xlsm

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Copy rows to existing sheet by any value in E to Done sheet

    Sorry you spent weeks on this, just need a couple of lines of code. I think your example is suggesting copying shaded yellow cells? Not sure really, but this code works for cells in column E that have a value in them, as your post above suggests.

    This code is meant for an ActiveX button.

    Also, please note in your example file, the Done sheet is actually named "Done " (with a space after). So you need to fix that, or adjust the code if you expect it to run w/o error.

    Please Login or Register  to view this content.
    Last edited by walruseggman; 10-06-2015 at 05:11 PM.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    10-06-2015
    Location
    USA
    MS-Off Ver
    07
    Posts
    3

    Re: Copy rows to existing sheet by any value in E to Done sheet

    Thank you, it works but it's pulling it from all sheets. I need it to only pull from the active sheet to the done sheet. The intention is at the end of the day to just click and have that days completed rows on only the active sheet to be moved to the Done sheet. I had to remove .specialcells(2) in the last line for it to work. So what do I add to make only pull from the active sheet?

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Copy rows to existing sheet by any value in E to Done sheet

    I had to remove .specialcells(2)
    That's fine to do, but it means it will copy every row from E2 to the last row in E. You had mentioned you only wanted the rows copied that had values in E, which is what SpecialCells(2) does.


    Anyway, to modify for just the active sheet:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-06-2015
    Location
    USA
    MS-Off Ver
    07
    Posts
    3

    Re: Copy rows to existing sheet by any value in E to Done sheet

    Works, with a little tweaking. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 10-29-2014, 06:00 AM
  2. [SOLVED] Macro to copy rows from the data sheet to existing worksheet
    By terence8 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2014, 08:08 AM
  3. Replies: 2
    Last Post: 11-18-2013, 07:31 AM
  4. [SOLVED] Copy row from sheet 1 to next row in sheet 2. delete from sheet 1 and move rows up
    By papabob1954 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2012, 09:38 PM
  5. Copy rows into existing sheet based on the value of a cell.
    By jamesjy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 05:45 PM
  6. Need VBA code to Copy all on a sheet to another existing sheet
    By appform in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-24-2010, 11:24 AM
  7. [SOLVED] Copy the entire sheet to overlay existing sheet?
    By LurfysMa in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-29-2005, 03:05 PM

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