title: Excel Tables VBA: Trying to select rows based on column value
body: <p>I am a beginner. I have been trying to teach myself VBA and researching this question for two weeks, including reviewing all the relevant answers on this forum. I give up!</p>
  
  <p>I am trying to loop through the rows of a table to select a table row based on the content of one of the row's cells (naming a particular column). I want to use the name of the table column. But something is wrong with my "If ... Then" statement. I get errors with every attempt. Right now I get a compile error "Expected Then or Go To," with the period before Value highlighted. But I have a feeling that if I fixed that error there would be another one right behind it. What am I getting wrong, besides trying to learn this on my own? ;>)</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>Sub CommandButton1_Click()
      Dim tbl As ListObject
      Dim x As Long
      Set tbl = ActiveSheet.ListObjects("Table1")
         For x = 1 To tbl.Range.Rows.Count
             If (Range("Table1[Status]")).Value = "Completed"
                 'I can't seem to find the right statement to put between If and .Value!
                 Rows(x).Select
             End If
      Next x
  End Sub
  </code></pre>