title: Find all cells changed with paste or drag
body: <p>SETUP:</p>
  <p>Start with a sheet that has 3 columns.  &quot;ID&quot;, &quot;MyNote&quot;, &quot;MyDate&quot; headers.  This sheet may have thousands of rows of data.</p>
  <p>I need to &quot;flag&quot; any row where the user has made a change to anything on the row.  In other code the flagged rows will be in turn be used to update a table on my SQL server.</p>
  <p>Typically there will only be a few rows the user would change/update in a session.  So I don't want to process every row in the sheet, particularly the ones with no changes.</p>
  <p>WHAT I HAVE WORKING NOW:</p>
  <p>I have done this successfully by writing a &quot;x&quot; to an additional &quot;flag&quot; column any time the user makes a change.  Then later I can process any rows that were flagged with a &quot;x&quot; .  I did this using:</p>
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  ...
  ' Flag any lines with a change
      If Not Intersect(Target, Me.Range(TestForChangeColRange)) Is Nothing Then
          Application.EnableEvents = False
            ' Set the &quot;Pending Write&quot; Flag
            Target.Worksheet.Range(PendingWriteCol &amp; Target.Row).Value = &quot;x&quot;
          Application.EnableEvents = True
  
  ...  
  </code></pre>
  <p>PROBLEM:</p>
  <p>That works great for individual cells being updated one at a time.  The problem comes when a user either a) uses the drag and copy (drag the bottom right corner of a cell to replicate it where dragged), or b) with a paste from some other workbook, in either case more than one cell is changed at a time.</p>
  <p>In those cases, the Worksheet_Change sees only the first cell and not any extra cells edited by dragging or pasting.</p>
  <p>I tried to find other similar solutions for intercepting Copy/Paste, etc., but I can't see anyway to find that if a copy was made, which cells were affected.</p>
  <p>NEED:</p>
  <p>All I need to know is which row numbers were affected from a drag or a copy/paste.  If I can accurately  flag those rows as updated, I'm in business.</p>
  <p>FOLLOW-UP</p>
  <p>Using Tim's solution.  Having trouble melding something back into it.
  Additionally I need to be able to check if a particular column was edited and if it was, clear a different column.  For example, if Col 2 is edited, clear the contents of Col 3.</p>
  <p>I tried adding the test inside the For loop, but my colno for rw.Col is coming out off.</p>
  <pre><code>If Not rng Is Nothing Then
      'expand the range so we can flag by row, and not cell-by-cell
      Set rng = Application.Intersect(rng.EntireRow, rngTbl)
      For Each rw In rng.Rows 'loop over affected rows
          Me.Cells(rw.Row, PendingWriteCol).Value = &quot;x&quot;
  
          If rw.Column = RequestTypeCol Then
            Me.Cells(rw.Row, LastColToClear).ClearContents
          End If
  
      Next rw
  End If
  </code></pre>
  <p>Can you show me what I've done wrong?</p>