Wrong way round, there - A is the column, not the row:

Cells(1,i).Select