Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to Sort by Color in Excel
  • Get column name from index in Excel Table
  • Chart Axes in Excel
  • Conditional Formatting Data bars Examples in Excel
  • Conditional Formatting New Rule with Formulas in Excel

References

  • To count total rows in a range in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Lookup entire row in Excel
  • How to use Excel MMULT Function
  • How to use Excel MATCH Function

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation must contain specific text
  • Excel Data validation whole percentage only
  • Data validation must not exist in list
  • Excel Data validation specific characters only

List holidays between two dates in Excel

by

To list holidays that occur between two dates, you can use a formula based on the TEXTJOIN and IF functions.

 Formula

{=TEXTJOIN(", ",TRUE,IF(dates>=start,IF(dates<=end,holidays,""),""))}

Note: the TEXTJOIN function is new in Excel 2016.

Explanation

In the example shown, the formula in F8 is:

{=TEXTJOIN(", ",TRUE,IF(B4:B12>=F5,IF(B4:B12<=F6,C4:C12,""),""))}

This is an array formula and must be entered with control + shift + enter.

How this formula works

At a high level, this formula uses a nested IF function to return an array of holidays between two dates. This array is then processed by the TEXTJOIN function, which converts the array to text using a comma as the delimiter.

Working from the inside out, we generate the array of matching holidays using a nested IF:

IF(B4:B12>=F5,IF(B4:B12<=F6,C4:C12,""),"")

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.

 

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Excel If, Nested If, And/Or Criteria Examples
  • How to return blank in place of #DIV/0! error in Excel
  • How to use Excel OR Function
  • IF, AND, OR and NOT Functions Examples in Excel
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get first day of previous month in Excel
  • Calculate time difference in hours as decimal value in Excel
  • Get days between dates in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • How to get same date next month or previous month in Excel

Grouping

  • Running count group by n size in Excel
  • Categorize text with keywords in Excel
  • Calculate conditional mode with criteria in Excel
  • Group numbers at uneven intervals in Excel
  • Group arbitrary text values in Excel

General

  • How to get random value from list or table in Excel
  • How to create dynamic worksheet reference in Excel
  • Find, Trace and Correct Errors in Excel Formulas using ‘Formula Auditing’
  • How to calculate decrease by percentage in Excel
  • 44 Practical Excel IF function Examples
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning