First row is automatically deleted after pasting data into sheet - bug?

  • Hello! I am pretty (extremely) new to Excel, and am trying to create a spreadsheet that will conditionally move rows to other sheets based on cell values. The macro that I found and edited works to do this, but the problem is that when I paste data into the main sheet, the first row is (erroneously) deleted. If I proceed to paste another chunk of data on, say, row 16, the first row of that data (starting on row 16) is deleted. The only solution so far has been to include a blank row at the top of the copied data. This is too error-prone of a fix I think. The issue is definitely macro-related - it goes away if I clear the code. Any help or advice is greatly appreciated!! My code is below:

  • This line in macro will always delete the first row when sheet changes :

    1. 'Delete Row from Prescreening
    2. Range("A" & Target.Row & ":O" & Target.Row).Delete xlShiftUp

    It occurs if row 1 is edited (A1) or any other cell in Col A.