xlCellTypeVisible capturing non-visible cells for deletion

  • Hi All! I picked up a piece of code off a forum for using the Advanced Filter xfiltercopy to cut from one sheet to another based on criteria, instead of the usual copy.

    Context: If I specify any value in column A on my main data sheet, I want the macro to cut those marked rows to another hidden sheet. Then on that hidden sheet, I need it to paste below the last record, not overwrite the existing data that exists there (keeps a running list of my hidden data). Its working great when I specify a value in column A so there is data to exclude, however when I run the macro when I haven't specified a value in any row on Column A (which is a possibility I need to account for), it deletes the whole data set?

    Data headers start at row 4 on my "Data" sheet, the Advanced Filter criteria in cells A1:A2 are just an * to capture any value in column A.

  • Re: xlCellTypeVisible capturing non-visible cells for deletion

    I seem to have figured out a solution myself...... I've just added an IF statement at the start of the sub to check if the Column A "hide" column is empty... if empty it exits the sub.