Thanks Mat
It appears to do what need.
A line by explanation would be good. I'm glad to have the code, but it's better to understand it so maybe I don't have to ask so many questions and I can use
it somewhere else.