Thanks for the quick reply. This does essentially what I need, however, I didn't make clear that the value in the Place line will not always be XXXX. I was just using that as a placeholder. It can be any four characters. With that being said, what's the best way to get those characters from the string?

Also, how do I keep the formatting the same as it was in the original file. That is, keep empty lines as is instead of removing them?

Thanks.