title: VBA that will copy and paste last record into first blank row
body: <p>I am new to VBA, so my query is probably (hopefully) a straightforward one! </p>
  
  <p>I have a large database of client details, and want to write a macro for the worksheet that will find the last non-blank row, copy the row, and paste the 'format' and 'validation' into the first blank row. I want the macro to automatically run all the time (so the first blank row will always have the formats etc applied the same as the row above, even when more clients are added).</p>
  
  <p>So far I have written this, and when I press Run Sub it works the first time, however if I add details in the last blank row I get an error. When I try debug it highlights the row after 'Copy last row:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
      'Copy last row
  
          Range("C" &amp; Rows.Count).End(x1Up).Rows.Select
          Selection.Copy
  
      'Paste format and validation into next blank row
  
          Range("C" &amp; Rows.Count).End(x1Up).Offset(1).Rows.Select
              Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
              SkipBlanks:=False, Transpose:=False
              Selection.PasteSpecial Paste:=xlPasteValidation, Operation:=xlNone, _
              SkipBlanks:=False, Transpose:=False
              Application.CutCopyMode = False
  
  End Sub
  </code></pre>
  
  <p>Also, I am running the code based on column "C" because that is a required field, so will never be blank for any of the records.</p>