In the example shown, the formula in F8 is: This is an array formula and must be entered with control + shift + enter. Working from the inside out, we generate the array of matching holidays using a nested IF: If the dates in B4:B12 are greater than or equal the start date in F5, and if the dates in B4:B12 are less than or equal the end date in F6, then IF returns a an array of holidays. In the example shown, the list looks like this: {"";"";“Presidents Day”;“Memorial Day”;"";"";"";"";""} This array is then delivered to the TEXTJOIN function as the text1 argument, where the delimiter is set to “, " and ignore_empty is TRUE. The TEXT JOIN function processes the items in the array and returns a string where every non-empty item is separated by a comma plus space. Note: the TEXTJOIN function is a new function available in Office 365 and Excel 2019.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.