Hi Venkat,

Your formula works in the attachment. However, here the OP wants a different solution. Download OP's attachment and test your formula there.