I went through the example referred by you. I testedit in my example. It is working and has solved myproblem. I have now understood the right coding forusing excel's built-in function