Textjoin and skip cells with zero

andrew_milonavic

Board Regular
Joined
Nov 16, 2016
Messages
98
Hi,

Is it possible to textjoin and skip cells with the number zero. I understand I can skip blank cells with true/false etc but zero's are not blank.

Example below:

[TABLE="width: 500"]
<tbody>[TR]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]0
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[TD]1,2,3,4
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks

Andrew
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
This is an array formula and must be committed with CONTROL+SHIFT+ENTER not just enter. If done correctly Excel will put {} around the formula.
Code:
=TEXTJOIN(",",TRUE,IF(A1:E1>0,A1:E1,""))
 
Upvote 0
Hey Aladin / Scott,

Last followup.

Any way to make the formula skip zero's with other cells containing text?

Example:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cat
[/TD]
[TD]Dog
[/TD]
[TD]0
[/TD]
[TD]Fish
[/TD]
[TD]Cat,Dog,Fish
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks

Andrew
 
Upvote 0
Hey Aladin / Scott,

Last followup.

Any way to make the formula skip zero's with other cells containing text?

Example:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cat[/TD]
[TD]Dog[/TD]
[TD]0[/TD]
[TD]Fish[/TD]
[TD]Cat,Dog,Fish[/TD]
[/TR]
</tbody>[/TABLE]

Thanks

Andrew

Control+shift+enter:

=TEXTJOIN(",",TRUE,IF(ISTEXT(A1:D1),A1:D1,""))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top