+ Reply to Thread
Results 1 to 14 of 14

Moving a row from one sheet to another when value entered from drop down box

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Moving a row from one sheet to another when value entered from drop down box

    Hi There!

    I am totally new to this sort of thing in Excel, however I have found myself in need of a way to move a row from one sheet to another when a value is entered from a drop down box.

    Basically, in column M of sheet 1 (titled Master Sheet), if 'Ready To Process' is selected from the drop down box I need the whole row to be moved over to sheet 2 (titled Ready To Process) and deleted from the original sheet. I need each row added to the second sheet to appear on the next available row.

    I've seen other examples of this type of requirement before, but being a novice I haven't been able to amend it to suit my own needs.

    If you need anything else to help work this out let me know!

    Thanks in advance to anyone able to help me with this. :-)

    Andrew

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    Right click on the sheet which has the data and select View Code. Copy this code over -
    Please Login or Register  to view this content.
    As you change the entries in the dropdown, the rows will move.
    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
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    Hi Arlette,

    Thanks for that. I entered the code as suggested, however upon selecting 'Ready To Process' from the drop down box nothing happened. I'm not sure if perhaps I've done something wrong?

    Andrew

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    It worked fine at my end. Is the spelling the same? Even the case?

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    Ah, it was my fault, the workbook wasn't macro-enabled. I've sorted that now and it works, so thank you!

    One small question though, when the row is deleted from the original sheet an empty row remains. Is there a way for it to totally delete the row, moving the ones beneath it up?

    Thank you!

    Andrew

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    Replace this code line
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    That's fantastic!

    One final question, sorry to be a pain!

    If I had two other drop down options that also needed to be sent to another sheet, how would I structure that?

    So for instance, I have a 'Failed' option and a 'Failed' sheet, and also an 'On Hold' option and an 'On Hold' sheet. If I wanted to be able to send a row to one of those three sheets by choosing the corresponding drop down option, how would that look?

    Thanks again!

    Andrew

  8. #8
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    Hi again,

    I wonder if someone would be able to help me with the above question? :-)

    Thanks!

    Andrew

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    The Failed and On Hold are in the same column as Ready to Process, right?

  10. #10
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    Yep, they're options in the same drop down box, but when selected that row will need to be sent to the related sheet, if that makes sense?

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    Try this
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    That works like a charm! Thank you so so much for your help, it's greatly appreciated! :-)

    Andrew

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Moving a row from one sheet to another when value entered from drop down box

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

  14. #14
    Registered User
    Join Date
    01-25-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Moving a row from one sheet to another when value entered from drop down box

    Thank you. I was about to do this, just got distracted!

    Andrew

+ 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