Function Problems

How to Split a Text Range into Start and End Dates in Excel

Rana GarciaRana Garcia Nov 11, 2026 869 views

Question details

The user needs to extract a start date and an end date from a single continuous text string (e.g., "Jun 06 - Jun 21, 24") and distribute them into two separate date-formatted cells.

How to Split a Text Range into Start and End Dates in Excel
Product
Excel
Device & OS
not provided
Scenario
Data cleaning and formatting where raw date range data is imported or entered as continuous text strings, making it impossible to perform standard date-based calculations or sorting.
Observed behavior
The start and end dates are bound together in a single text string, preventing standard spreadsheet tools from recognizing them as separate, valid date serial numbers.
Before you start

Ensure that the text date ranges in your dataset follow a consistent structural pattern (such as 'Month Day - Month Day, Year') so that a single formula can accurately process the entire column without generating #VALUE! errors.

Solution 1Recommended

Use Modern Text Extraction Formulas (TEXTBEFORE, TEXTAFTER)

This is the most robust method for modern Excel users. It utilizes the LET function alongside TEXTBEFORE and TEXTAFTER to dynamically isolate the month, day, and year components, safely converting them into distinct start and end date serial numbers.

By defining variables within the LET function, you can cleanly parse the text around the hyphen (-) and comma (,) separators. The DATEVALUE function is then used to convert these extracted string pieces into actual numerical dates.

1
Extract the start date

Select the empty cell where you want the start date to appear. Assuming your original text is in cell B2, enter the following formula: =LET(md,TEXTBEFORE(B2," -"),d,TEXTAFTER(md," "),m,TEXTBEFORE(md," "),y,TEXTAFTER(B2,", "),DATEVALUE(d&"-"&m&"-"&y)). Press Enter.

2
Extract the end date

In the adjacent empty cell for the end date, enter the formula: =LET(md,TEXTAFTER(TEXTBEFORE(B2,","),"- "),d,TEXTAFTER(md," "),m,TEXTBEFORE(md," "),y,TEXTAFTER(B2,", "),DATEVALUE(d&"-"&m&"-"&y)). Press Enter.

3
Apply correct date formatting

Select the newly calculated cells containing the start and end dates. They may appear as standard numbers. Press Ctrl+1 to open the Format Cells dialog, select 'Date' from the Number tab, choose your preferred date format, and click OK. Finally, select the cells and drag the fill handle down to apply the formulas to the rest of your data.

Use Modern Text Extraction Formulas (TEXTBEFORE, TEXTAFTER)
Format Consistency: Using DATEVALUE ensures the resulting output is treated as a true date by your spreadsheet rather than just visually formatted text.
Data Processing in WPS Spreadsheet

Clean and Split Messy Date Data Easily with WPS Spreadsheet

WPS Spreadsheet provides powerful data cleaning utilities and a complete suite of text-manipulation functions. Whether you need to use advanced formulas or simple Text-to-Columns wizards, you can perfectly format complex date strings in seconds.

  1. 1. Open your data in WPS Spreadsheet: Launch WPS Office and open your workbook containing the column of combined date strings.
  2. 2. Apply text extraction formulas: Click into a blank adjacent column and input your preferred text extraction formula (e.g., using LEFT, RIGHT, and MID) to isolate the dates.
  3. 3. Format as dates instantly: Highlight your newly extracted columns, right-click and choose 'Format Cells', then apply your desired Date format to finalize your data cleaning process.
Fully compatible with Microsoft Excel formulas, standard date formats, and layout logic.Includes robust text extraction functions like LEFT, RIGHT, FIND, and advanced data-cleaning wizards to sort out messy date ranges.Lightweight, free to use, and features a familiar interface, ensuring a seamless workflow migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my extracted date formula return a #VALUE! error?

This usually occurs if the extracted text string cannot be recognized as a valid date format by your system's regional settings. Ensure the month abbreviation, day, and year are correctly concatenated with recognizable separators (like hyphens or slashes) before applying the DATEVALUE function.

Can I use the 'Text to Columns' feature to split dates instead of formulas?

Yes, you can use the Text to Columns wizard found under the Data tab. Select 'Delimited', set the hyphen (-) as your custom delimiter, and split the text into two columns. However, note that if the year is only located at the very end of the original string, you will need to manually append the year to the start date column afterward.

How do I fix formulas that stop working on dates with single-digit days?

If your original text sometimes features single-digit days (e.g., "Jun 6" instead of "Jun 06"), strict character-counting formulas like LEFT(E4,6) will extract incorrect data. It is highly recommended to use dynamic delimiter-based formulas using TEXTBEFORE, TEXTAFTER, or FIND to locate spaces and hyphens regardless of character length.