Copy row from one sheet to another

  • forum.ozgrid.com/index.php?attachment/73382/


    Hi I want to create a macro which will cut every row that is marked as 'yes' in the 'completed' collumn on the 'CMP' sheet. Then paste these into the 'Completed Actions' sheet. I've tried different codes but cannot get the data to paste in the correct rows. I need to data to paste in the next blank row.


    I have attached screenshots of the sheets so that makes more sense.


    Thank you!

  • Re: Copy row from one sheet to another


    Hello Eve,


    Do you mean you have added a 'Completed' sheet in your 'Meeting Action Points Tracker V2' workbook ... and that you would like items to move automatically as they are completed ...?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy row from one sheet to another


    Yes I have added a completed sheet, should be able to see it on the screenshots I attached. It is labelled 'completed actions'. I would like the macro to run when I click a button.

  • Re: Copy row from one sheet to another


    It would be much easier for everybody if you uploaded the workbook itself, not pictures of it.

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

  • Re: Copy row from one sheet to another


    As soon as you select 'Yes' in the Column G ... an event macro can trigger itself ...


    Would you need this feature for All of your worksheets ...?


    If it is the case, how do you need to keep track of the 'source' worksheet in your 'completed actions' sheet ?
    Would you like a proposal along these lines ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy row from one sheet to another


    In the worksheet 'Completed Actions' ...the column G could show the source worksheet ...


    Do you agree ?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy row from one sheet to another


    OK then ...


    You could test following macro ..


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy row from one sheet to another


    Hi that worked great on the first sheet I tried. When I added it to all the sheets, it doesn't work on any of the others?

  • Re: Copy row from one sheet to another


    Hi, I have just noticed it's because it isn't recognising if I select 'Yes' for the bottom line. Only the top line.

  • Re: Copy row from one sheet to another


    Hello Eve,


    Not sure to understand the problem you are facing ...


    Would you mind attaching your latest updated workbook ...

  • Re: Copy row from one sheet to another


    Thanks for the example ...


    Please replace the macro with this version :



    Hope this will help

  • Re: Copy row from one sheet to another


    That works perfectly thank you!


    Would you be able to help me with an auto sort by 'due date' for each sheet as data is entered? I am using this macro currently in the 'view code' section of each sheet but it doesn't sort the 'Who by' collumn for some reason.


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
        On Error Resume Next
        Range("D5").Sort Key1:=Range("D6"), _
          Order1:=xlAscending, Header:=xlYes, _
          OrderCustom:=1, MatchCase:=False, _
          Orientation:=xlTopToBottom
    End Sub


    Thank you!

  • Re: Copy row from one sheet to another


    Glad you could fix the 'Copy' issue ...:wink:


    Regarding your 'Sort' event macro ... what should trigger the event ...?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Re: Copy row from one sheet to another


    Quote from skywriter;797426

    Eve when posting code it is mandatory to use code tags.
    Please use code tags in the future.


    code tags?

  • Re: Copy row from one sheet to another


    Any text that you paste into a message which is VBA code MUST have code tags added. Select the VBA code and click once on the # button on the editor toolbar to add the tags. You can see what it does from your posts where they have been added for you.


    The rules, to which you agreed upon joining, are here in case you need to refresh your memory: http://www.ozgrid.com/forum/misc.php?do=showrules

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!