+ Reply to Thread
Results 1 to 6 of 6

Move row of data to another sheet once a date is entered in a specific column

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    6

    Move row of data to another sheet once a date is entered in a specific column

    Hello! I've used this site many times to figure things out...but this time, I just can't seem to get it. I've read a number of posts in attempt to do it on my own, but have been unsuccessful.

    I need the entire row of data to move from [WORKLOAD] sheet to [COMPLETED] sheet once a date has been entered in Column E “Date Completed” of the WORKLOAD sheet. Please note, I don’t want to just copy the data, I want to move all of it.

    Any help would be greatly appreciated. Thanks in advance!
    Attached Files Attached Files

  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: Move row of data to another sheet once a date is entered in a specific column

    Would you be entering all the dates and then clicking on a button to trigger the data transfer? Or do you want the data transferred as soon as a date is entered in the column?
    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
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Move row of data to another sheet once a date is entered in a specific column

    Hi,

    If you paste this code to sheet2 (WORKLOAD), it will probably work.

    Please Login or Register  to view this content.
    Please note, that this runs every time you edit a cell on that worksheet!

  4. #4
    Registered User
    Join Date
    10-25-2012
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Move row of data to another sheet once a date is entered in a specific column

    This is great! Thank you so much.

    I do, however, need to modify the spreadsheet to include additional columns. How can I keep the code running on the "Date Completed" column all the time, rather than just in Column E? Thanks again!!
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Move row of data to another sheet once a date is entered in a specific column

    I'm so happy it works! :D

    You know, this line is repsonsible for column "E":
    Please Login or Register  to view this content.
    This means that the IF function checks whether the cell you changed is in the 5th column (column "E"). You can modify that to any column you want. Changing it to 6 would be "F", 7 is "G", etc.

    (In my opinion it would be a suboptimal solution to make the script search for the column that is labeled "Date completed". Someone might change that cell and then the code is not working. Then again, the code is still not working if you add extra columns and don't change the column number in the code, so maybe I'm just lazy.)

  6. #6
    Registered User
    Join Date
    10-25-2012
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Move row of data to another sheet once a date is entered in a specific column

    I’ve been tweaking my final spreadsheet and have to say it looks great thanks to your help. I have one more question though.

    If Column A is empty, then the row just replaces another row in the new sheet rather than moving the row down. I tried messing around with the code to check for Column B instead of A but I keep running into a bug. (Column B will always have data included)
    Is there a way to change the code you gave me to check column B or should I just create an If function to automatically include something in Column A if it’s empty.
    Thanks again!

+ 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