I am running a macro which filters a column to show only records with "#N/A" (ie an error), and copies these to another worksheet.
As I am aiming for no errors, there will be occasions when there is no filtered data.
My problem is that, unless I use something like xlCellTypeVisible, when there is no data shown it still copies and pastes all the hidden records.
And if I do use it when no filtered data, I currently get an error "No cells were found"
I have tried many iterations of code correction and i think i'm currently blinded by staring at it so long!
My current if statement reads as follows:
![]()
Please Login or Register to view this content.
I think I might need to use some sort of On Error Resume Next statement, but I have never used these before.
When I tried adding that before the If statement, it just ignored the criteria and tried copying hidden rows - the exact opposite of what I want.
I'd like something that said, if this condition = error, skip over entire if statement and carry on with rest of the sub.
Please can someone offer some help?!
Bookmarks