Delete Certain rows

  • Hi all,

    Im doin a macro, and i need to get code to delete rows in col E that have have certain data i.e a, c, d, h. But i only want these deleted if the rows in col G are blank. Is the some kind of if statement that can be used for this?
    Any help on this would be great.

    Thanks in advance,

  • Halp

    Here is some code that might help:

    MySheet would be the sheet name you are running the operations on.
    RowPtr is the first row you want to start checking.
    MYVALUE would be the value you want to check for. You can check for more by using the OR operator in your IF statement.

    RowPtr is only incremented if the row was not deleted. If the row was deleted, it basically goes to the next row on its own.

Participate now!

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