Thank you so much for your reply, MikeTheBike.
I copied your function in a
VB Code Module. Then I used it in Sheet1 like this :
=YourCalc(a1,b2). But there is a error in the formula "NAME?.
Dear Whether I used it in a wrong way or there is some thing wrong in the Funtion.
Please help me.
Thanks