Thank you everyone for your great replies - I guess there is not a simple formula I can use in Excel.

Some great responses from some smart people - thanks!