+ Reply to Thread
Results 1 to 5 of 5

Move Rows from one worksheet to another if 30 days past completion date

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    Augusta, GA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Move Rows from one worksheet to another if 30 days past completion date

    Hi,

    I'm new to the forum and VBA. I have an Action Plan workbook that contains a list of actions on a worksheet called "Action Plan" beginning in row 6. There is data in columns A-I for each row. I would like to insert a Macro that will run when the "Action Plan" sheet is selected. If the completion date (column H beginning in line 6) is more than 30 days past the current day (which is calculated in cell I2), then I want the entire row to be copied to a sheet called "Completed" (beginning in row 6) and deleted from the "Action Plan" sheet. Some of the cells in column H do not have a date. Would it be better to add another column that calculates to "1" if the row needs to be moved? I tried copying and modifying some code I found on a similar thread but kept getting errors with the range selection. I'm using Excel 2010. I appreciate your help!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Move Rows from one worksheet to another if 30 days past completion date

    Hi leerjeddar,

    I'm ignoring the rows where there is no date in column H:

    Please Login or Register  to view this content.
    **The code is untested **
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-07-2012
    Location
    Augusta, GA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Move Rows from one worksheet to another if 30 days past completion date

    This worked great! I added a button to the action plan to run the macro so it is easier for the users. Thanks for the help on this! I'm sure I will need more help in the future. This was very quick and gave me exactly what I needed.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Move Rows from one worksheet to another if 30 days past completion date

    @ leerjeddar

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Move Rows from one worksheet to another if 30 days past completion date

    You're welcome! I'm pleased that it ran right off - very gratifying!

+ 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