Originally Posted by
ExcelQuestion
This is a good code. Could somebody please explain the purpose If Not Intersect...? The event seems to work with or without it.
More importantly, when I clear the contents within Column 1, I get a debug error prompt. I do need to manually clear the entire contents (and I need to "B1" range to auto clear at the same time).
Thanks,
Ricky
Hi Riccy,
The 'Not Intersect' ensures that the code only runs if a change is made in column A. Changes other than in col A have no effect. If you leave the Not intersect bit out then the code will run whenever a cell anywhere is changed.
The problem you have with clearing column A is associated with the Advanced Filter which needs a column header to work. Obviously if you clear the entire contents of column A, there is no column header for the Advanced filter to work with - hence the error. You could use the following slightly amended code which will check whether you are deleting more than one cell from column A, and if so it will delete ALL of column A and B.
Bookmarks