Your final solution may work, but your macro is a lot of mixed up crap with a lot of rubbish in it...
It is not possible to do simple changes to a macro designed to work properly on text files to work instead on Excel files.
But it is impossible to try to explain any of that to you.
Bookmarks