Ahh thanks very much. I had tried that with the first formula but got errors which I didn't understand. This works perfectly. Cheers all for your help!