title: If second two characters equal this then that
body: <p>I have a string of letters and numbers, where if the second two characters of the string equal a certain value, then a location value should be shown in the corresponding column. </p>
  
  <p>I have used the <code>MID</code> function to essentially extract the characters of the string that I want to use <code>MID(A2,2,2)</code> but now I can't figure out how to compare what is returned to a list of options that those two characters could be without typing in each option in an extremely long formula.</p>
  
  <p>Here are possible strings that are situated in a column:</p>
  
  <pre><code>3PH356969   
  MSFFACEBUS   
  MBH0007398   
  MBH0007402  
  </code></pre>
  
  <p>I am extracting the second two characters of these, to compare to a list similar to this</p>
  
  <pre><code>PH  
  SF  
  BH  
  PG  
  HR
  </code></pre>
  
  <p>These values then correspond to location (below), which would optimally be returned:</p>
  
  <pre><code>Philadelphia   
  Bay Area    
  Birmingham   
  Western PA   
  Hartford
  </code></pre>
  
  <p>I can write <code>=IF(MID(A2,2,2)="PH","Philadelphia",else...)</code> but then the else-ifs will go on for 76 more  2-character strings to compare against. I'm hoping there is a more optimal way for this.</p>
  
  <p>Expected results should be the location corresponding to the string, or just "error" displayed.</p>