Many thanks for your prompt help. When I read the code (with my limited
understanding) it looks to me you have addressed my need. But I don't
know how to run it in my excel file and see whether it fully addresses
my problem. If you don't mind, can you create a sample excel file and
send me.