title: Can I use formulas in select case
body: <p>I have a function with the following select case statement.  The function does not work if I have an Excel in the condition section.</p>
  
  <p>Like:   <code>Case Is &gt;= Sheets("list").Range("M50")</code></p>
  
  <p>The function works if I put in a value for the condition,
   such as:         <code>Case Is &gt;= 5</code></p>
  
  <p>The select is shown below.  Is using a formula not allowed? Is there a work around?</p>
  
  <pre><code>Select Case distance
  
  
  Case Is &gt;= Sheets("list").Range("M50")
  RightPlace = Sheets("list").Range("n50").Value
  
  Case Is &gt;= Sheets("list").Range("M51").Value
  RightPlace = Sheets("list").Range("n51").Value
  
  Case Is &gt;= Sheets("list").Range("M52").Value
  RightPlace = Sheets("list").Range("n52").Value
  
  Case Is &gt;= Sheets("list").Range("M53").Value
  RightPlace = Sheets("list").Range("n53").Value
  
  Case Is &gt;= Sheets("list").Range("M54").Value
  RightPlace = Sheets("list").Range("n54").Value
  
  Case Is &gt;= Sheets("list").Range("M55").Value
  RightPlace = Sheets("list").Range("n55").Value
  
  Case Is &gt;= Sheets("list").Range("M56").Value
  RightPlace = Sheets("list").Range("n56").Value
  
  Case Is &gt;= Sheets("list").Range("M57").Value
  RightPlace = Sheets("list").Range("n57").Value
  
  Case Is &gt;= Sheets("list").Range("M58").Value
  RightPlace = Sheets("list").Range("n58").Value
  
  
  
  End Select
  </code></pre>