I apologise for the way I posted the code, I will make sure I use code tags in the future
Thank you for the code it worked perfectly.