Forum Discussion
why do textjoin with if return a zero
- Mar 10, 2020
There are many ways to write the formula, my way of constructing of the formula read as below
=TEXTJOIN("-",TRUE,IF((NOT(ISBLANK(Table1[Text]))*(Table1[Number]=101))=1,Table1[Text],""))
Reason of returning Zero
When you are doing the array calculation of comparing 101 with Number column it is check all the rows which has 101 & return the result as TRUE,
we need to construct our formula in such a way by ignoring the blank values from our array
So I have to compare the Text Column [Non Blank] with Number column [101]
=(NOT(ISBLANK(Table1[Text]))*(Table1[Number]=101))=1
and select only the non empty row and pass it as logical test to IF Function & joint the text with TEXTJOIN which ignore the blank value.
Attached is the file for your ready reference
Regards, Faraz Shaikh | MCT, MIE, MOS Master, Excel Expert
If you find the above solution resolved your query don't forget mark as Official Answer.
There are many ways to write the formula, my way of constructing of the formula read as below
=TEXTJOIN("-",TRUE,IF((NOT(ISBLANK(Table1[Text]))*(Table1[Number]=101))=1,Table1[Text],""))
Reason of returning Zero
When you are doing the array calculation of comparing 101 with Number column it is check all the rows which has 101 & return the result as TRUE,
we need to construct our formula in such a way by ignoring the blank values from our array
So I have to compare the Text Column [Non Blank] with Number column [101]
=(NOT(ISBLANK(Table1[Text]))*(Table1[Number]=101))=1
and select only the non empty row and pass it as logical test to IF Function & joint the text with TEXTJOIN which ignore the blank value.
Attached is the file for your ready reference
Regards, Faraz Shaikh | MCT, MIE, MOS Master, Excel Expert
If you find the above solution resolved your query don't forget mark as Official Answer.