Suggest you attach a couple of those sample text files, and mention what exactly you expect the macro to do.