Not too sure what you mean but I'll have a guess.

lCol = Cells(target.row, Columns.Count).End(xlToLeft).Column
Cells(target.row, lCol + 1).Value = Range("A" & target.row).Value
This bit selects the last column with data in it for the row that's changed and writes to it. To force this to write to column Z replace with:

range("Z" & target.row).value = Range("A" & target.row).Value