+ Reply to Thread
Results 1 to 12 of 12

Moving Rows into a different sheet based on a cell value

  1. #1
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Moving Rows into a different sheet based on a cell value

    Hi Excel experts,
    I am working on a worksheet, and would like to have an entire row transferred to another worksheet based upon a certain cell's value, in this case Column H = SENT then move to Completed Sheet

    Having searched through the many solved threads on this site, I attempted to customize some of the code to my worksheet. Not being proficient in Macro/VBA, I failed. I figured I would ask for help, and see if anyone can provide what I am looking for.

    Basically, I am attempting to construct a "work in progress" file, and would like all completed work to be deleted from the work in progress sheet, and transferred to a sheet that contains a running list of all work SENT

    Attached is an example of what I am working on. I would like Column H (Status) to determine if a row can be moved to a sheet that contains the list of all work completed, and eliminated from the original sheet. Once Status is updated to "SENT", it would be helpful to be able to run a macro/click a button that would perform the transfer.

    Can anyone assist?
    Attached Files Attached Files
    Last edited by ajvalles1; 10-01-2015 at 02:12 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    I downloaded your file but when I went into the Visual Basic Editor, I got a message that your project is unviewable because it is a shared file. Could you post an unshared version of the file?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving Rows into a different sheet based on a cell value

    Quote Originally Posted by Mumps1 View Post
    I downloaded your file but when I went into the Visual Basic Editor, I got a message that your project is unviewable because it is a shared file. Could you post an unshared version of the file?
    Hi, Thanks for the response. I've attached an editable file here Attachment 422085

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your "Work in Progress" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. I've named your destination sheet as "Work Completed". Change the name in the code to suit your needs. Close the code window to return to your sheet. When you enter "SENT" in column H and exit the cell, that row will automatically be copied to the "Work Completed" sheet and deleted from the "Work in Progress" sheet.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving Rows into a different sheet based on a cell value

    Quote Originally Posted by Mumps1 View Post
    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your "Work in Progress" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. I've named your destination sheet as "Work Completed". Change the name in the code to suit your needs. Close the code window to return to your sheet. When you enter "SENT" in column H and exit the cell, that row will automatically be copied to the "Work Completed" sheet and deleted from the "Work in Progress" sheet.
    Please Login or Register  to view this content.
    Thank you so much. That worked. Let's say someone on the staff accidently enters "SENT" and exits cell, is there a way to undo the macro?

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    There is no UnDo'ing a macro. You would need another macro to put the line back. Is that what you want?

  7. #7
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving Rows into a different sheet based on a cell value

    Quote Originally Posted by Mumps1 View Post
    There is no UnDo'ing a macro. You would need another macro to put the line back. Is that what you want?
    No that is fine, what you provided was more than awesome. I appreciate it.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    My pleasure.

  9. #9
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving Rows into a different sheet based on a cell value

    Quote Originally Posted by Mumps1 View Post
    My pleasure.
    Hey Mumps,

    So I got a more difficult task assigned to me, I've been searching like crazy, maybe you can help me out with this.

    So we added 3 more sheets in between the Work in Progress to the Completed Stage.

    Reads like this.

    1.Blast Queue
    2. Follow Up Blast
    3. Follow Up 2
    4. Follow 3
    5. Completed Blasts

    Attachment 422508

    I tried recreating the code by just copying it before the end of the previous sheet but that didnt work. I'm trying to get each of these works moved from 1 to 2. 2 to 3. 3 to 4. 4 to 5 (completed).

    Not sure if this will pose a problem if we use the same word "SENT" as the trigger on all of these to move them along, what do you think?

    Also as we move them along is there a way to program sheet 2 date; 7 days after the Date of Send on Sheet 1? and 10 days from the send of sheet 2 on sheet 3?

    I know I'm getting super complicated. Let me know if this is even possible. Thanks again

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    The macro still works as before if you enter "Sent" in column H of the "Blast Queue" sheet. I'm having trouble following what you are now asking. Please be more specific using examples and referring to specific cells, ranges and sheets. Maybe the easiest way to explain what you want is to enter some data in the other sheets so that I can see the end result and post the updated file with a detailed explanation.

  11. #11
    Registered User
    Join Date
    02-17-2015
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Moving Rows into a different sheet based on a cell value

    Quote Originally Posted by Mumps1 View Post
    The macro still works as before if you enter "Sent" in column H of the "Blast Queue" sheet. I'm having trouble following what you are now asking. Please be more specific using examples and referring to specific cells, ranges and sheets. Maybe the easiest way to explain what you want is to enter some data in the other sheets so that I can see the end result and post the updated file with a detailed explanation.
    so the new sheet I attached, I need data to move in the following way.

    From the Blast Queue Sheet Once you enter "SENT" in the H Column --> move entire row to Initial Email Blast Sheet --> I also want "Date of Send" Column E to automatically populate a date (Date of send in Column E + 7 days)

    From Initial Email Blast Sheet once you enter "sent" in that H Column (in initial Blast) -->move that same entire row to Follow Up Blast Sheet ---> "Date of Send" Column E to automatically populate a date (Date of send in Column E + 7 days)

    And so on that that One Row for example (Individual Listing - Fox River HTML - Pat- 10/1/2015 - AJ- OUT FOR APPROVAL) will have to move through all the sheets (Starting Point:Blast Queue, Initial Email Blast, Follow Up Blast, Follow Up 2, End Point: Completed Blasts)

    Email2.xlsm

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Moving Rows into a different sheet based on a cell value

    Put this macro in the worksheet code module for your "Blast Queue" sheet.
    Please Login or Register  to view this content.
    Then copy it to the worksheet code module for the "Initial Email Blast" sheet changing the sheet name in the code to the next destination sheet. Continue this until the "Follow Up 2" sheet changing the name of the destination sheet each time. You don't need to copy the macro into the "Completed Blasts" sheet since it's at the end of the line. I also modified the code so that the "Status" column is not copied to the other sheets otherwise that column would always contain the word "Sent".

+ 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. [SOLVED] Moving Rows to different sheet based on cell criteria
    By SpreadsheetNublet in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2015, 03:12 PM
  2. Moving rows to another sheet based on a Value
    By Mieke47 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2015, 10:25 AM
  3. Moving rows to another sheet in the same workbook based on a cell value.
    By OpOrange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2014, 04:37 PM
  4. Macro to copy rows based on moving date and paste the rows into an identical sheet
    By ivandc1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2014, 11:59 AM
  5. [SOLVED] Moving rows to another sheet based on a certain field's value.
    By erod1214 in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 09-12-2012, 03:28 PM
  6. Replies: 3
    Last Post: 06-24-2011, 03:00 AM
  7. Replies: 0
    Last Post: 11-11-2005, 02:35 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