Add conditional TEXTJOIN
There is a popular user defined function publishe on the web called CONCATENATEIF (http://stackoverflow.com/questions/22639868/vba-user-defined-function-for-concatenate-if-by-rows)
It extends TEXTJOIN to include a conditional.
I've written a TEXTJOINIFS with a paramarray and a few bonus features. https://stackoverflow.com/questions/50716550/textjoin-for-xl2013-with-criteria/50719050#50719050
Also, could add a flag (FALSE or TRUE) to sort the returned list (TRUE) or not sort (FALSE). Default to TRUE, and different order in the unsorted list becomes a hidden "feature".
The sorting could also be extended to a different cell value (with additional arguments - perhaps
TEXTJOINIF(separator, concatenate_range, criteria,[sorted],[sort_criteria])
then you could sort the cities by population, or by name.
Omar Khan commented
I understand the issue you are point out Kenneth, but I think a textjoinif would be very useful nonetheless. If I have a table of data with city, state, and rounded populated (e.g., 100-250k, 250-500k) and need to summarize it to create a concatenated list of all cities in one state with a certain population, textjoinif should be able to handle this. To your point, if I resort the list the value my textjoinif displays would change (with the same data, but reordered), but that is something the function help can call out for users.
Kenneth Barber commented
The problem with CONCATENATEIF compared to the other -IF functions is that it is not commutative. If the user sorts their range, then the formula's output will change. This will mess up any order-dependent parsing.
Also, we could avoid -IF variations of functions if we filter for the values that we want before passing them to the regular function (in this case, TEXTJOIN). See my comment below.
We might also want a TEXTSPLIT function in order to reverse TEXTJOIN without using Text To Columns.