Glad of been of help laugh

Here are the concepts behind the solution, if insterested.