title: Excel VBA Range.Value type mismatch?
body: <p>I've written code to delete a row if a cell in column G has the value " - ". However, I'm getting a type mismatch when referring to the cell in the for each loop. I know the problem is coming from "curr.Value," but I don't know how to fix it. Any ideas?</p>
  
  <p>Here's my code: </p>
  
  <pre><code>Sub deleteRows()
  Dim curr As Range
  Dim ws As Worksheet
  Set ws = Workbooks("ExtractedColumns").Sheets("practice")
  For Each curr In
      Workbooks("ExtractedColumns").Sheets("practice").Range("G:G")
       If curr.Value = " - " Then
          EntireRow.Delete
       End If
  Next
  End Sub
  </code></pre>