+ Reply to Thread
Results 1 to 13 of 13

Cut row and paste to another worksheet next avaliable row

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Cut row and paste to another worksheet next avaliable row

    Hi all,

    I love this forum and have learned so much already. But I am stuck on something and I really hope someone can help me with this! I am trying to write a macro for the following; When the cell value in column M changes to Yes (in worksheet "Prospects") then it should cut the entire row (the row of the changing value to Yes) and paste it to the next available line in sheet "Macro". With my current macro it does only copy's the row and sorts it. What I would like is that it cuts the row, paste it to the next available line wihout sorting the sheet. This is my VBA code;

    Please Login or Register  to view this content.
    Hope someone can help me! Thank you in advance
    Last edited by jeffreybrown; 08-21-2012 at 09:36 AM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    This is workable, but first, take a few minutes and read the forum rules about code tags.

    Once this is completed we can proceed with a solution.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Cut row and paste to another worksheet next avaliable row

    Hi Jeff,

    Thanks for your reply. I read the rules and think I have to make the following adjustment, please let me know if I am wrong. Thank you for your help and I really hope you can help met out! Thanks

    Please Login or Register  to view this content.
    Hope this is better Thanks in advance

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    Thanks for the update.

    Right click on worksheet tab Prospects, View Code and paste on right side of screen.

    Everytime the word "Yes" is entered in column M, that row will be cut to the next available row in the Macro sheet.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Cut row and paste to another worksheet next avaliable row

    Hi Jeff,

    It works amazingly! Thank you so much for your help! Great forum with great people! Have a nice day

    Greetings,
    Bram

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    Hi Bram,

    Thanks for the feedback and glad it worked out for you.

    Please don't forget to mark your thread as solved.

  7. #7
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Cut row and paste to another worksheet next avaliable row

    Hi Jeff,

    One more question if you don't mind. Would it be possible to hide the row when column M changes instead of deleting the row (as it is cut)? If possible, can you help me adjusting the script?

    Greetings,
    Bram

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    If "Yes" is entered in column M, do you want both to happen? Row moved to the Macro worksheet tab and also hidden.

    What about unhiding the rows at a latter date?

  9. #9
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Cut row and paste to another worksheet next avaliable row

    Yes, it would be great if both can happen. So copy to next available row on macro sheet, and hide row in Prospect sheet

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    Try...

    Please Login or Register  to view this content.
    This will unhide all rows.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Cut row and paste to another worksheet next avaliable row

    Jeff, it is perfect. Thank you so much. I will mark this thread as solved.

    Have a great day

  12. #12
    Registered User
    Join Date
    08-21-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Cut row and paste to another worksheet next avaliable row

    Hi guys,

    I've followed your instructions but it doesn't work for me.

    As you can see, i only changed the tab name "Macro" for "Done" and the word Yes for Done, and it seems to clash in the very last order "Sheets("Done").Range ("A" & Sheets("Done").Cells(Rows.Count, 1).End(xlUp).Row + 1)"

    Any suggestions on what i'm doing wrong?

    Many thanks!!

    Ernest

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-21-2012 at 09:35 AM.

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Cut row and paste to another worksheet next avaliable row

    Hi Ernest1974 & Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

    Please alse refer to the forum rules about using code tags when posting code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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