Why doesn't this work?
yovation wrote...
=CONCATENATE(IF(B30,B3,""),IF(C30,C3&", ",""),
IF(D30,D3&", ",""),IF(E30,E3&", ",""))
When any of the logicals are false, the formula still displays the ,
To see what's happening, enter FALSE in, say, X99 and =X990 in Y99.
Unless you're running under the Transition Formula Evaluation setting,
the Y99 formula will return TRUE. Why? Because in Excel's wonderful
default semantics, any numeric value < any text value < FALSE < TRUE.
Next, if you can use & inside the IF calls, use it outside the IF
calls too. There's never a good reason to use CONCATENATE.
So could B3:E3 contain either numbers or booleans (TRUE/FALSE)? You
want only positive numbers displayed?
If you want only the positive numbers included, and commas separating
multiple ones, you need to use something like this.
=SUBSTITUTE(TRIM(IF(COUNTIF(B3,"0"),B3,"")&" "
&IF(COUNTIF(C3,"0"),C3,"")&" "&IF(COUNTIF(D3,"0"),D3,"")&" "
&IF(COUNTIF(E3,"0"),E3,""))," ",", ")
|