title: Calculate the value of a cell based on another cell in Excel
body: <p>Here is a sample table:</p>
  
  <pre><code>         A          B           
  1        animal     value       
  2        dog        brown          
  3        cat        black 
  </code></pre>
  
  <p>In another sheet cell A1 is a drop down list of all animals in the above column A. What is the formula for this pseudo code to calculate what value goes in A2 in the other sheet:</p>
  
  <p>If A1 (in the other sheet) equals dog, A2 (in the other sheet) equals the value directly to the right of dog in the sample table (brown)</p>
  
  <p>If A1 (in the other sheet) equals cat, A2 (in the other sheet) equals the value directly to the right  of cat in the sample table (black)</p>
  
  <p>and so on...</p>