Posts by Armedeus

    Looking for help to stop my macro overwriting manually entered data.

    The code below works - sort of. If there is data in column D, then the data will paste on the next empty row.

    However if there is data manually entered in any other column than D, then the code just overwrites that data when pasting.

    Could I have some help in modifying my code so that if it sees any data in any column, it will go to the next empty row and paste from column D as required by the existing code.


    Sub WagesAllocationL4()
    Dim copySheet As Worksheet
    Dim pasteSheet As Worksheet
    Dim lr As Long
    Set pasteSheet = Worksheets("Fortnightly")
      lr = pasteSheet.Range("D" & Rows.Count).End(xlUp).Row
    pasteSheet.Range("D" & lr + 1).PasteSpecial xlValues
    Application.CutCopyMode = False
    End Sub