Before I move it to the UDF section please give it the once over. I couldn't resist working on it. I implemented your suggestions and code. It tests out OK.

I have updated the original post to save space.

Mark