Hi there, I read your description inside the file but I am afraid this cannot be accomplished with formulas only.
I you allow me I can deliver a macro that will do the job and deliver as open code for you.
I am available to do it immediately and deliver on the same day.
At your disposal to discuss on chat. Please, do not hesitate to contact me even if offline, as I check the mobile messenger very often.
Thanks for the attention.