title: Select Case not returning expected value
body: <p>I believe I'm using the CASE statement correctly, but it's not returning the expected values.</p>
  <pre><code>Option Explicit   
  Option Compare Text
  
  Sub airport()
      Dim y As Long
      Dim airportname As String
  
      Select Case airportname
      Case &quot;Los Angeles Airport&quot;
          y = 1
      Case &quot;Long Beach Airport&quot;
          y = 2
      Case &quot;Ontario Airport&quot;
          y = 3
      Case &quot;Palm Springs Airport&quot;
          y = 4
      Case Else
          MsgBox (&quot;Something's Wrong&quot;)
      End Select
  
      airportname = WS.Range(&quot;A2&quot;).Value 
      Range(&quot;B1&quot;).Value = y
      Range(&quot;C1&quot;).Value = 2                        'expected value of B1
      Range(&quot;D1&quot;).Value = WS.Range(&quot;A2&quot;).Value     'expected value is Long Beach Airport
      airportname = WS.Range(&quot;A4&quot;).Value
      Range(&quot;B2&quot;).Value = y
      Range(&quot;C2&quot;).Value = 3                        'expected value of B2
      Range(&quot;D2&quot;).Value = WS.Range(&quot;A4&quot;).Value     ' expected value is Ontario Airport
  
  End Sub
  </code></pre>
  <p>When I run this code, here is the output:</p>
  <pre><code>B1: 0   C1: 2  D1: Long Beach Airport
  B2: 0   C2: 3  D2: Ontario Airport
  MsgBox: Something's Wrong
  </code></pre>
  <p>I tried moving the Case statement to be after the code and it still doesn't work.  I'm not sure why the Case doesn't seem to be assigning a value to the variable y and returning that.</p>