title: Getting VBA to loop through an array
body: <p>I have a database with a set of numbers from 1~100. I would like VBA to run through this list in column A and, on areas where A is between 20 and 40, type McFly on column B.</p>
  
  <p>The code I have gives me a mismatch error 13 on the line that starts with "If list >="  </p>
  
  <pre><code>Dim list As Range
  Dim list_readthru As Range
  Set list = Range("A2", Range("A50").End(xlUp))
  For Each list_readthru In list
  If list &gt;= 20 And list &lt;=40 Then Range("B:B") = "McFly"
  Next list_readthru
  End Sub
  </code></pre>
  
  <p>I am having problems identifying what I am doing wrong. </p>