Record a macro to remove the filter ... I have no idea what you are doing so I can't provide it. Then change the Exit Sub to an If ... Then ... Else ... End If.

It's really a new question because the original has been answered.

Regards, TMS