Hi dilipandey,

Thank you for quick response.

Your formula works! It returns the desired results, but also produces other undesirable results(or I'm doing something wrong). This is not a big issue but if there is a way to get rid of it that would be good. Please see attached sample:

Book1.1.xlsx

Thank you very much for your help.

Regards
Robert