title: Case Function Equivalent in Excel
body: <p>I have an interesting challenge - I need to run a check on the following data in Excel:</p>
  
  <pre><code>|   A  -   B  -   C  -  D   |
  |------|------|------|------|
  |  36  |   0  |   0  |   x  |
  |   0  |  600 |  700 |   x  |
  |___________________________|
  </code></pre>
  
  <p>You'll have to excuse my wonderfully bad ASCII art. So I need the D column (x) to run a check against the adjacent cells, then convert the values if necessary. Here's the criteria:</p>
  
  <p>If column B is greater than 0, everything works great and I can get coffee. If it doesn't meet that requirement, then I need to convert A1 according to a table - for example, <code>32 = 1420</code> and place into <code>D</code>. Unfortunately, there is no relationship between A and what it needs to convert to, so creating a calculation is out of the question.</p>
  
  <p>A case or switch statement would be perfect in this scenario, but I don't think it is a native function in Excel. I also think it would be kind of crazy to chain a bunch of <code>=IF()</code> statements together, which I did about four times before deciding it was a bad idea (story of my life).</p>