title: Copy and Paste a Range of Cells to another sheet if a cell outside the range =Resolved then delete the row
body: <p>I currently have multiple sheets for storing records of payments (things to be Pay and CantPay). I am trying to write a macro that will copy and paste Cells A:M on every row where column T = "Resolved" on the CantPay sheet (where the next empty row is the next row where "a" &amp; row-number = blank) to the "Pay" sheet.</p>
  
  <p>Within the sheet which i want to copy from there is data in columns A:T but N:T are not needed once the problem is resolved. So once i have copy and pasted the data within cells A:M i want to just delete the entire row. I have written some code from what i knew and looking online which isn't working. Any help would be much appreciated.</p>
  
  <p>Thanks </p>
  
  <p>I have tried recording a macro and writing my own but it seems the macro i have wrote is deleting row 1 which is where all my column headers are stored.</p>
  
  <pre><code>Sub MoveToPay()
  
  Dim CantPay As Worksheet: Set CopySheet = Sheets("Can't Pay")
  Dim ReadyToPay As Worksheet: Set PasteSheet = Sheets("£ Pay")
  Dim lr As Long
  Dim S As String
  
  
  Application.ScreenUpdating = False
  
  Columns(20).AutoFilter 1, "Resolved"
  With Range("a2", Range("M" &amp; Rows.Count).End(3))
      .Copy PasteSheet.Cells(Rows.Count, 1).End(3).Offset(1)
      .EntireRow.Delete
  End With
  Columns(20).AutoFilter
  
  
  Application.ScreenUpdating = True
  
  
  
  End Sub
  </code></pre>