I do not have time to read all the messages to see if you have got the answer
but the problem in the line Cells("A1").Select is that the expression cells
should be written like cells(rowIndex, colIndex) If you want to use the name A1
you should write it as Range("A1") and not as Cells("A1")
Im suprised that the macro wrote it like that