Hi Cadavre,
I don't know how to thank you enough for such a comprehensive answer, this is exactly what I was looking for.
I'm picking through it bit by bit to understand the logic of it all.
In future I will add some meaningful sample data as a script to make it easier for a working solution. 🙂
Greatly appreciated,
Joe