Is Textjoin inconsistent or am I doing it wrong again?
I have a number of stores in different cities. Each store has a certain size (or class or infrastructure level etc.) which can change over time.
I would like a list of those stores currently size 1, those of size 2 etc.
My attempt at this consists of three columns of if() formulae to determine if a particular store is in class (column) 1, 2 or 3.
Having isolated the stores that are size 1, I want to use text join to concatenate them into a single cell that I can reference elsewhere later on.
This first attempt was deliberately wrong, using the false parameter to show empty cells. It is working as expected ... but not producing the required result.
I thought that changing the Textjoin function to use the True parameter (the only change) would give me the correct result ... but it does not (!!!) ... and as far as I can see it is inconsistent in how it fails.
The help file for text join talks about the true/false flag ignoring 'empty' cells. Obviously none of my cells are literally empty (they contain the if functions). They do return an empty string ("") instead. So how does Textjoin treat empty strings?
Looking at the results below, the result in D1, starting Liverpool shows that with the true flag, "" are ignored like empty cells (D3, D4 are ignored, the text join results starts with D5 ... Liverpool). However, D7 and D8, also containing "", are not ignored hence the commas between Glasgow and Bristol.
Textjoin seems to both ignore "" cells and include "" cells in the same formula, regardless of the true/false flag. It seems to start ignoring the flag as soon as the first non-empty cell is discovered.
If empty literally means ignore empty then Textjoin would not work for me. If empty includes empty strings then why does it ignore "" sometimes and not others?
Obviously, I am effectively trying to generate a TextJoinIF function.
Is there a work around or different way to tackle this?
Thanks.
MacBook Pro (M2 Max, 2023)