Thanks Soul for your prompt reply. I am a newbie and no knowledge on VBA. I also got that code on this forum and it works fine for my need. However, i need it sorted out. Please provide the code. Thank you so much for your help.