i am really greatful you for spending your time for my problem HenrikOlsson. I have understood your explanations and logic behind the codes. These codes helped me out.

Thanks a lot.