In the example shown, the formula in cell E5 is: Note: the other examples in column E all use different text formats.

End date missing

If the end date is missing, the formula won’t work correctly because the hyphen will still be appended to the start date (e.g.“March 1 - “). To handle this case, you can wrap the concatenation and second TEXT function inside IF like so: This creates the full date range when both dates are present, but outputs only the start date when the end date is missing.

Start date missing

To handle a case where both dates are missing, you could nest another IF like this: This formula simply returns an empty string (””) when date1 is not available.

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.