This code is exactly what I needed right now. Whilst I wrote a very longwinded alternate, this is very much smaller and neater!

Thank you!



Tim