Hi
I think this might be possible to do with a formula.
But it is much too difficult for me to do. Sorry-

If nobody else at excelfox can help you, then possibly you could try at
mrexcel.com
or
excelforum.com ( https://www.excelforum.com/forumdisplay.php?f=8 )
or
eileenslounge.com


Good luck
Alan

(P.S. I could do a macro solution for you. I am better with VBA then with formulas )