Macro Help - Copy row to new sheet and delete

  • I have the following macro that I have for a Worksheet that is a Table. What I am trying to accomplish is to move any row that has the value of "Closed" in column N to another sheet called "Closed". As of now, the macro does copy the row, but there are 2 issues I have with it.

    1. It does not delete the row for the originating sheet (gives run-time error '1004' Delete method of Range class failed.)

    2. It copies all of the formatting with it. I want it to take on the formatting of the new sheet.

    Neither worksheet is protected.

    Here is the macro;

    Thanks for any help on this.

  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post

    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.

    How to use code tags

    Just highlight all of the code and press the <> in the post menu above button to add the code tags.


  • There should be no reason to have to move the rows and it's best practice to maintain the data on one sheet.

    You simply filter the data to display Closed, or whatever you need.

    It is a Table so the code ought to be working with that not what you have got.

  • Change you code to this

Participate now!

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