title: Replace long list of 'If Activecell.value = X' with an array?
body: <p>I have written a macro to search through a column of text and remove values that match the text in the macro below (when the text matches the entire row is deleted). The list of values to remove is around 140 unique numbers, and I have listed 5 below as an example.</p>
  
  <p>What would be a simplified way of writing this portion of code rather than writing 'Activecell.Value = XXXX Or _' 140 times?</p>
  
  <p>I was researching ways to use an array to store all the values I want deleted however I was not able to implement it properly.</p>
  
  <p>Thanks for the help!</p>
  
  <pre><code>Sub DeleteClosedStores()
  
  Range("F7").Select
  
  While ActiveCell.Value &lt;&gt; ""
      If ActiveCell.Value = 25401 Or _
          ActiveCell.Value = 8587 Or _
          ActiveCell.Value = 8275 Or _
          ActiveCell.Value = 8518 Or _
          ActiveCell.Value = 8522 Or Then
  
          Selection.EntireRow.Delete
      Else
          ActiveCell.Offset(1, 0).Select
     End If
  Wend
  </code></pre>