Glad you sorted it & thanks for the feedback.

I thought that you were trying to put the formula into the cell.