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
 
Hey Aladin / Scott,

Is it possible to offset the range every 4 columns?. Data range would be a1:d1 and if I copied that cell over a column the next range would be e1:h1.

My results are on a separate page in case your wondering where the result cell is going in relation to how the data is laid out.

Thanks

Andrew
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hey Aladin / Scott,

Is it possible to offset the range every 4 columns?. Data range would be a1:d1 and if I copied that cell over a column the next range would be e1:h1.

My results are on a separate page in case your wondering where the result cell is going in relation to how the data is laid out.

Thanks

Andrew

In B1 control+shift+enter, not just enter, and copy across:

=TEXTJOIN(", ",TRUE,IF(ISTEXT(OFFSET($A$1:$D$1,0,(COLUMNS($A:A)-1)*4)),OFFSET($A$1:$D$1,0,(COLUMNS($A:A)-1)*4),""))

See also Jonmo1's response in your additional "follow-up" thread.
 
Upvote 0
Thanks Aladin! It works!, so does Jonmo1's on my followup thread.

Now I just need to understand "how" they work :)

I really appreciate all your help

Andrew
 
Upvote 0
Hey Aladin,

The formula works when the results are on the same sheet as the data, but when the results are calculated on another sheet it will not skip the zeros from being returned in the results.

Thoughts?

Thanks

Andrew
 
Upvote 0
Hey Aladin,

The formula works when the results are on the same sheet as the data, but when the results are calculated on another sheet it will not skip the zeros from being returned in the results.

Thoughts?

Thanks

Andrew

Let A1:Z1 of Sheet1 house the data.

In A1 of Sheet2 control+shift+enter and copy across:

=TEXTJOIN(", ",TRUE,IF(ISTEXT(OFFSET(Sheet1!$A$1:$D$1,0,(COLUMNS($A$1:A1)-1)*4)),OFFSET(Sheet1!$A$1:$D$1,0,(COLUMNS($A$1:A1)-1)*4),""))
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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