There was a mistake in my original formula as posted.
should have been
If you are still having difficulties, mail me a copy of uor workbook.
roger at technology4u dot co dot uk
Change the at and dots to make valid email address.
Microsoft Excel MVP