$ 0 0 Hi Eng, The logic I have pasted in the screenshot is given by Praveen.It is working now Thank you