Hi

Thanks for the reply & your help

When activating the macro, it now comes up with run time error 9 "subscript out of range" and the folowing code is highlighted

k(n, j) = d(r, c)

It would be appreciated if you would amend your code and advise accordingly