Forum Discussion

Yugandhar__Y's avatar
Yugandhar__Y
Copper Contributor
Jan 18, 2026
Solved

Merging FROM and TO dates to 1 cell

Hello!!

 

I have the FROM date as 01-01-2026 and the TO date is 07-01-2026.

I wish to have 01-01-2026 TO 07-01-2026 as the heading of this column.

Please suggest

  • Lorenzo's avatar
    Lorenzo
    Jan 27, 2026

    Thanks for the feedback. Feel free to click Mark as solution (at the bottom of the post)  to help people who Search for existing solution. Thanks for them

6 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    …two methods:

    1. Universal Method (Works in all Excel versions, including Excel for Mac).
    2. Modern Method (Requires Excel 2019/365/2021, leveraging dynamic arrays).

     

    Method 1: Universal Formula (All Excel Versions)

    =TEXT(FROM_DATE_CELL, "dd-mm-yyyy") & " TO " & TEXT(TO_DATE_CELL, "dd-mm-yyyy")

    Steps:

    1. Replace FROM_DATE_CELL and TO_DATE_CELL with your actual cell references (e.g., A2 and A3).
    2. The TEXT function formats dates as dd-mm-yyyy.
    3. The & operator concatenates the formatted dates with " TO ".

    Example:
    If dates are in A2 (FROM) and A3 (TO):

    =TEXT(A2, "dd-mm-yyyy") & " TO " & TEXT(A3, "dd-mm-yyyy")

     

    Method 2: Modern Formula (Excel 2019/365/2021)

    =TEXTJOIN(" TO ",, TEXT(FROM_DATE_RANGE, "dd-mm-yyyy"), TEXT(TO_DATE_RANGE, "dd-mm-yyyy"))

    Steps:

    1. Replace FROM_DATE_RANGE and TO_DATE_RANGE with your date ranges (e.g., A2:A3 if dates are stacked vertically).
    2. TEXTJOIN combines the formatted dates with " TO " as the delimiter.

    Example:
    If dates are in A2 (FROM) and A3 (TO):

    =TEXTJOIN(" TO ",, TEXT(A2, "dd-mm-yyyy"), TEXT(A3, "dd-mm-yyyy"))

     

    …Considerations

    1. Regional Settings:
      • The format "dd-mm-yyyy" assumes European date formatting. If your system uses "mm-dd-yyyy" (e.g., US), adjust to "dd-mmm-yyyy" (e.g., "01-Jan-2026") for clarity:
      • =TEXT(A2, "dd-mmm-yyyy") & " TO " & TEXT(A3, "dd-mmm-yyyy")
    2. Date Locations:
      • If dates are in the same row (e.g., A2 and B2), use:
      • =TEXT(A2, "dd-mm-yyyy") & " TO " & TEXT(B2, "dd-mm-yyyy")
    3. Handling Time Components:
      • If dates include time (e.g., 01-01-2026 15:30), use "dd-mm-yyyy hh:mm" to retain time:
      • =TEXT(A2, "dd-mm-yyyy hh:mm") & " TO " & TEXT(A3, "dd-mm-yyyy hh:mm")

     

    Final Formula (Recommended)

    =TEXT(FROM_CELL, "dd-mm-yyyy") & " TO " & TEXT(TO_CELL, "dd-mm-yyyy")

     

    Troubleshooting

    • #NAME? Error: Ensure TEXTJOIN is available (Excel 2019+). If not, use Method 1.
    • Incorrect Format: Verify the date format code matches your regional settings (e.g., "mm/dd/yyyy" in the US).

     

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    For any version of Excel.

    =TEXT(A2,"dd-mm-yyyy") & " TO " & TEXT(A3,"dd-mm-yyyy")

     

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi

    Not knowing:

    • Version of Excel you use, assumed >/= 2021
    • How dates are formatted according to your Regional Settings, assumed dd-mm-yyyy
    • Where your TO/FROM dates seat on the sheet, assumed TO below FROM

    in C2 above:

    =TEXTJOIN( " TO ",, TEXT( C3:C4, "dd-mm-yyyy" ) )

Resources