Alphafrog that is an amazing bit of code. So tidy and efficient works perfectly, thanks so much.

Do you mind commenting what it does exactly, e.g. what exactly is the Ubound and scripting dictionary function?

many thanks