title: Combine Text in ArrayFormula
body: <p>I have a table using Google Sheets. It has three columns that will always have a null value or a specific value for that column. Each line will have one, two, or three values; it will never have three null values on one line. In the fourth column, I want an ArrayFormula that will combine those values and separate the values with a comma if there is more than one.</p>
  
  <p>Here is a photo of what I am trying to accomplish.
  <a href="https://i.stack.imgur.com/yFtdm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yFtdm.png" alt="enter image description here"></a></p>
  
  <p>I've tried several ideas so far and this formula is the closest I've gotten so far but it's still not quite working correctly; I think it is treating each column as an array before joining rather than doing the function line by line. I'm using the LEN function rather than A2="" or ISBLANK(A2) because columns A-C are ArrayFormulas as well. I realize this probably isn't the most efficient formula to use but I think it covers every possibility. I'm definitely open to other ideas as well.</p>
  
  <pre><code>={"Focus";
    ArayFormula(
      IFS(
        $A$2:$A="", "",
        (LEN(A2:A)&gt;0 &amp; LEN(B2:B)&gt;0 &amp; LEN(C2:C)&gt;0), TEXTJOIN(", ", TRUE, A2:A, B2:B, C2:C),
        (LEN(A2:A)&gt;0 &amp; LEN(B2:B)&gt;0 &amp; LEN(C2:C)=0), TEXTJOIN(", ", TRUE, A2:A, B2:B),
        (LEN(A2:A)&gt;0 &amp; LEN(B2:B)=0 &amp; LEN(C2:C)&gt;0), TEXTJOIN(", ", TRUE, A2:A, C2:C),
        (LEN(A2:A)=0 &amp; LEN(B2:B)&gt;0 &amp; LEN(C2:C)&gt;0), TEXTJOIN(", ", TRUE, B2:B, C2:C),
        (LEN(A2:A)&gt;0 &amp; LEN(B2:B)=0 &amp; LEN(C2:C)=0), A2:A,
        (LEN(A2:A)=0 &amp; LEN(B2:B)&gt;0 &amp; LEN(C2:C)=0), B2:B,
        (LEN(A2:A)=0 &amp; LEN(B2:B)=0 &amp; LEN(C2:C)&gt;0), C2:C
      )
    )
  }
  </code></pre>
  
  <p>Is it possible to achieve this with Google Sheets?</p>