You will need VBA in a user defined function (UDF) for this.
Here is one by tigeravatar.
If you are not familiar with how to install VBA code:
How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the code into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
The syntax of the new formula:
Concatall(the_array,[optional: separator],[optional: Unique_only True/False])
This may need to be array entered.
If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
If performance is slow consider reducing the range in the INDIRECT to just a few more rows than you anticipate needing. While COUNTIF will take whole columns the results are being passed to this UDF. It may be doing a lot of unnecessary work.
Bookmarks