title: How to Concatenate multiple columns if not empty
body: <p>I want to concatenate the values of 9 columns into 1 column with | between the values. The problem is that some of the columns are empty for some of the rows, making it pretty ugly to use the =CONCATENATE() function as you would need to check =if(A2="";...) for every of the 9 columns.</p>
  
  <p>Is there a smarter way to combine these multiple columns in excel, only using the cell that have values in it? Maybe using VBA?</p>
  
  <p>To exemplify, the sheet looks something like:</p>
  
  <pre><code>| A    | B    | C | D     | E       | F | G   | H   | I   |
  |------+------+---+-------+---------+---+-----+-----+-----|
  | lion | king |   |       | animals |   |     |     | dog |
  | lion |      |   | queen |         |   | cat | jet |     |
  </code></pre>
  
  <p>Output for the 1. line should be: "lion|king|animals|dog" and for the 2. line: "lion|queen|cat|jet"</p>
  
  <p>Can someone help?</p>
  
  <p>Thanks a lot upfront!!</p>