Hello,

I have tried using this code and I get a #NAME? error in the cell I have put the formula in.

Thanks in advance for the help.

Phil.