title: Removing rows based on a certain cell value in Excel Mac
body: <p>I've been trying to remove hundreds of rows from my Excel file, where each of these rows have a cell containing the word 'V1'. I managed to find some VBA code online relating to my issue. </p>
  
  <pre><code>Sub DeleteRows()
  'Updateby20140314
  Dim rng As Range
  Dim InputRng As Range
  Dim DeleteRng As Range
  Dim DeleteStr As String
  xTitleId = "KutoolsforExcel"
  Set InputRng = Application.Selection
  Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
  DeleteStr = Application.InputBox("Delete Text", xTitleId, Type:=2)
  For Each rng In InputRng
      If rng.Value = DeleteStr Then
          If DeleteRng Is Nothing Then
              Set DeleteRng = rng
          Else
              Set DeleteRng = Application.Union(DeleteRng, rng)
          End If
      End If
  Next
  DeleteRng.EntireRow.Delete
  End Sub
  </code></pre>
  
  <p>Unfortunately, every time I run the code where I select my cell range and input 'V1' as the value to remove the rows, I get the error message ‘Run-time error ‘13’: Type mismatch’. I don't know what else to do.</p>