title: Copy row where cell matches worksheet name
body: <p>I have the following code that moves rows to a specific worksheet where a cell value in column M is equal to value: 'not planned'</p>
  
  <pre><code>Sub Not_Planned()
  
  Sheets("All Data").Select
  
  RowCount = Cells(Cells.Rows.count, "a").End(xlUp).Row
  
  For i = 1 To RowCount
  
      Range("M" &amp; i).Select
      check_value = ActiveCell
  
      If check_value = "not planned" Then
          ActiveCell.EntireRow.Copy
          Sheets("Not Planned").Select
          RowCount = Cells(Cells.Rows.count, "a").End(xlUp).Row
          Range("a" &amp; RowCount + 1).Select
          ActiveSheet.Paste
          Sheets("All Data").Select
          Range("A2").Select
      End If
  
  Next
  
  End Sub
  </code></pre>
  
  <p>Is there a way to adapt the code so it runs through all rows and copies the row to a worksheet where the value in column A is equal to a worksheet name ?</p>
  
  <p>Please note: I already have a code that creates worksheets and names them as per unique values in column A.</p>
  
  <p>Thanks</p>