Thank you very much for your help, Alan

That function is wonderful! Works like a charm.