First I would like to thank you all for the number of replies.

LONKERO

Your function call looks very interesting.
Could you please expand on your information, i.e. what exact code I could use from my original posting and how do I call and return from the function.
I have to apologise as I am not a programmer and a little more help is required.

Many thanks

Steve