title: Deleting Duplicate Row. (Type Mismatch error)
body: <p>I'm getting type mismatch error on Line <em>"If Not LRow = Range("C65536").End(xlUp).Row = "" Then"</em></p>
  
  <pre><code>Private Sub DEDUPLICATE_Click()
  Application.ScreenUpdating = False
  Dim n As Long
  Dim LRow As Long
      If Not LRow = Range("C65536").End(xlUp).Row = "" Then
          LRow = Range("C65536").End(xlUp).Row
          For n = LRow To 6 Step -1
              If Application.WorksheetFunction.CountIf(Range("C6:C" &amp; n), Range("C" &amp; n).Text) &gt; 1 Then
              Range("C" &amp; n).EntireRow.Delete
          End If
      Next n
  End If
  </code></pre>
  
  <p>This code should delete all duplicate entity excluding the empty rows. Tried to change the data type from Long to Variant but it deletes all rows including the empty ones.</p>