I've written the below code which goes through a worksheet (after I've imported some text files), and deletes the header rows. The code works except for one thing. If there are no duplicates, it activates the "On Error" code. Can anyone tell me why this might happen? If there are duplicates, it removes them and everything works fine.
I was thinking I could put a counter in there and if there are no duplicates found, then I could "exit Sub" but I feel like I'm missing out on understanding something here.
Thanks if you can help
Bookmarks