Many thanks pike

That worked.

Did the other part of the post make sense as I also need to draw a border around cells as in the code?