+ Reply to Thread
Results 1 to 8 of 8

Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please Help

  1. #1
    Registered User
    Join Date
    02-24-2016
    Location
    Raleigh, NC
    MS-Off Ver
    2010
    Posts
    9

    Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please Help

    I have three identical worksheets named Sold, Delivered, and Closed
    I want rows to automatically copy, cut, and paste from Delivered to Closed – WHEN…
    The date that is previously entered in column H becomes “Todays Date”.

    This is code I have set on the Sold sheet that works very well for moving rows from Sold to Delivered when the trigger word “Delivered” is selected from a dropdown in column F. I’ve tried altering this code with words like CurrentD, TODAY(), to work to move rows from Delivered to Closed when the date entered in column H becomes today's date with no success.

    Please Login or Register  to view this content.
    I need a separate code to put on the delivered sheet that will automatically copy, cut, and paste rows from Delivered to Closed sheets – WHEN…
    The date that is previously entered in column H becomes “Todays Date”. It should be similar to the above code but with a different trigger = when date interred in column H becomes today's date.
    Last edited by Mykull; 03-11-2016 at 10:42 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-24-2016
    Location
    Raleigh, NC
    MS-Off Ver
    2010
    Posts
    9

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    Thanks Alan. I am new to VBA but I am learning. Thanks again.

  4. #4
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    Hello,

    this one works for me well:

    Please Login or Register  to view this content.

    Edit:
    Well, I am taking this back.
    This works when you manually enter the date... but you meant that you have already date entered (some future) and want to move the row when the date become present... right?


    Regards,
    sysss
    Last edited by sysss; 03-11-2016 at 11:13 AM.

  5. #5
    Registered User
    Join Date
    02-24-2016
    Location
    Raleigh, NC
    MS-Off Ver
    2010
    Posts
    9

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    Correct. When the date (already entered many days before) becomes the present date.
    Last edited by Mykull; 03-11-2016 at 11:25 AM.

  6. #6
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    Hi again,

    I have added this to sheet Activate event ...maybe is not the right one, could be workbook.open event... and together with previous one seems work like you want.


    Please Login or Register  to view this content.
    Regards,
    Petr

  7. #7
    Registered User
    Join Date
    02-24-2016
    Location
    Raleigh, NC
    MS-Off Ver
    2010
    Posts
    9

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    WOW – You’re good at this.
    Ref: Your first solution: That seems to work and may be all that is needed. What I will do is put in tomorrow’s date and wait until tomorrow and see if it auto moves then. It definitely works when you key in the current date though
    Ref: Your second solution: That also seems to work. Please forgive me I am new to this – a Rookie for sure. When you say “together with the previous one” this is what my code now looks like that also seems to work. (also see image). I guess it is correct.
    Code 1.0.jpg
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-14-2012
    Location
    Czech Republic
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Copy,Cut, Paste Row to different sheet when date entered becomes todays date - Please

    HI,

    well I no an expert at all, my friend, just learning on the go but thanks

    What I will do is put in tomorrow’s date and wait until tomorrow and see if it auto moves then
    I don't think this will work like that. You need to trigger the event somehow. The picture you shared seems to be OK. Here the event happens when you activate the sheet.
    But better I think, would be during workbook open. So try change to this:

    This code in the Sheet "Delivered":

    Please Login or Register  to view this content.
    This code in ThisWorkbook:
    Please Login or Register  to view this content.
    You can enter tomorrow's date in the spreadsheet, save the file and close it. Change your system date to tomorrow for testing. Open the workbook and rows should be moved to Closed.

    Regards,
    s.

+ 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. Autohide Columns that are < todays date and > todays date by 2 & 7 days
    By Dropfiddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2015, 03:51 AM
  2. Cells copy and paste after date entered
    By keez1993 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-24-2015, 10:51 AM
  3. Use VBA to Search for Todays Date from an array of Date and Paste Value
    By davis6774 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 07:11 PM
  4. Copy/paste row with todays date in Sheet2 to sheet 3....but from Sheet 1
    By cammyjane10 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-25-2013, 01:07 PM
  5. Cut and paste a row to another sheet after a date is entered into a cell
    By findleydd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2011, 09:49 PM
  6. Using VB to find a range based on todays date and todays date +30
    By Steve_al in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 09:31 AM
  7. Replies: 3
    Last Post: 05-28-2008, 01:32 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