title: Is there a coalesce-like function in Excel?
body: <p>I need to fill a cell with the first non-empty entry in a set of columns (from left to right) in the same row - similar to coalesce() in SQL. </p>
  
  <p>In the following example sheet</p>
  
  <pre><code>---------------------------------------
  |     |  A   |   B   |   C   |    D   |
  ---------------------------------------
  |  1  |      |   x   |   y   |    z   |
  ---------------------------------------
  |  2  |      |       |   y   |        |
  ---------------------------------------
  |  3  |      |       |       |    z   |
  ---------------------------------------
  </code></pre>
  
  <p>I want to put a cell function in each cell of row A such that I will get:</p>
  
  <pre><code>---------------------------------------
  |     |  A   |   B   |   C   |    D   |
  ---------------------------------------
  |  1  |  x   |   x   |   y   |    z   |
  ---------------------------------------
  |  2  |  y   |       |   y   |        |
  ---------------------------------------
  |  3  |  z   |       |       |    z   |
  ---------------------------------------
  </code></pre>
  
  <p>I know I could do this with a cascade of IF functions, but in my real sheet, I have 30 columns to select from, so I would be happy if there were a simpler way. </p>