lotuxel,

Thank for the quick response...
but the code is not working... pls help me by doing some modifications... for easy understanding of the output, please refer the attached excel file, in that I did manually...