Thank you, Luke!!! Your advice was exactly what I needed!
However, another problem appeared with this function. I followed all the steps in order to insert the function in my excel workbook, but every time I close it,suddenly the function disappears, and i can not use it any more.
So, I repeat...