Beni, I was looking for a similar solution this morning. Your formula was of great use. I tweaked it slightly to suit.

Thanks.