Yes. In Excel for Microsoft 365 on Windows, select the cells, then choose Data > Text to Columns > Delimited, select Other, type a hyphen, and finish the wizard. For a formula-based split that updates when the source changes, use TEXTSPLIT; the best method depends on whether you want a one-time change or a live result.
Choose the right way to split hyphenated text
Excel can divide a value at each hyphen into separate columns, but the available approaches behave differently. Text to Columns changes the selected data into fixed results. TEXTSPLIT creates formula results that recalculate when the original cell changes. Power Query is useful for repeatable imports, while Flash Fill can infer a pattern when you need a customized piece of the text rather than every segment.
For example, splitting North-West-03 at every hyphen produces three parts: North, West, and 03. Decide first whether you want to split at every hyphen or only at a particular one. Also check whether any destination cells already contain information: a split into multiple columns can overwrite it.
- Choose Text to Columns for a quick, permanent split of existing values.
- Choose TEXTSPLIT when you want results to update from a source cell.
- Choose Power Query for a repeatable data-cleaning process or a larger imported table.
- Choose Flash Fill when you want Excel to extract or reformat a pattern, not necessarily split every segment.
Split cells with Text to Columns
Text to Columns is Excel’s built-in option for separating text by a delimiter. It works well for a list that is already in the worksheet and does not need to remain linked to its original values.
- Make sure the cells to the right of the source column are empty, or choose a separate destination so existing data is not replaced.
- Select the cells containing the hyphenated values. If the data has a header, you can select the data cells without the header.
- Choose Data > Text to Columns.
- In the wizard, choose Delimited, then select Next.
- Clear delimiter choices you do not want. Select Other and type a hyphen (
-) in its box. - Review the preview. Set a destination if needed, then select Finish.
Excel places the first piece in the original column and puts later pieces in columns to its right. If a row has fewer parts than another, the extra destination cells for that row remain blank. The wizard can also let you treat consecutive delimiters as one. Leave that option off when consecutive hyphens are meaningful and you need the empty segment preserved; turn it on only when repeated delimiters should behave like a single separator.
Text to Columns is a transformation, not a live connection. After finishing, changing the original text does not automatically rebuild the split. Keep a copy of the source column if you may need to restore it. The wizard is available in desktop Excel for Windows and Mac; ribbon details can vary slightly by version. In Excel for the web, availability and interface can differ, so a formula may be more convenient if the command is not shown.
Use TEXTSPLIT for a live result
TEXTSPLIT divides text by a chosen delimiter and returns the pieces into neighboring cells as a spilled array. It is available in Microsoft 365 and Excel 2024. The output cells need to be empty; otherwise Excel may show a spill error rather than overwrite existing data.
With the text North-West-03 in A2, enter this formula in B2:
=TEXTSPLIT(A2,"-")
The result is North in B2, West in C2, and 03 in D2. The formula splits at every hyphen, and the results update if A2 changes. Copy the formula down for other rows; each result spills sideways from its own formula cell. Do not type into the spill range while it is in use.
TEXTSPLIT can also split on a multi-character delimiter if the exact sequence is consistent. For example, if entries use two hyphens as a separator, the delimiter argument can be set to "--". A normal hyphen and an en dash are different characters, so a formula or wizard set to split on - will not necessarily split text containing –. If the source data mixes dash characters, standardize them or handle each delimiter deliberately.
Handle repeated hyphens and uneven parts
Values do not always have the same number of hyphens. A product code such as AB-14-RED has three pieces, while AB-14 has two. Text to Columns and TEXTSPLIT can both place the available parts into separate columns, leaving unused positions blank for shorter values. Before processing a full list, check a few rows with the greatest number of segments so the output area is wide enough.
Leading, trailing, or consecutive hyphens need special attention. The value AB--RED contains an empty part between the two hyphens. Depending on the method and its settings, that empty segment may be retained or ignored. In TEXTSPLIT, the optional ignore_empty argument controls whether empty results between delimiters are kept. In Text to Columns, the wizard’s setting to treat consecutive delimiters as one affects this behavior. Choose based on what the empty segment means in your data, rather than assuming it is harmless.
Do not trim or discard empty parts automatically if positions have meaning. For example, an empty middle section in a code might represent a missing category, and removing it could shift later values into the wrong columns. If blank sections are accidental, clean or standardize the source values before relying on them for comparisons or lookups.
Split only at the first or last hyphen
The standard Text to Columns setup and a basic TEXTSPLIT formula split at every matching delimiter. That is not always what a reader means by “split by hyphen.” For a value such as ACME-North-West, splitting every hyphen creates three pieces. If you need only the first separator, you want ACME and North-West; if you need only the last, you want ACME-North and West.
For a one-off extraction, Flash Fill may be suitable: type the desired first result in a neighboring cell, begin the next example, and use Data > Flash Fill if Excel recognizes the pattern. Review the generated values, especially if rows are inconsistent. Flash Fill produces values rather than a formula relationship, so it will not automatically update when the source changes.
For a robust recurring process, Power Query offers more explicit transformation options. You can split a column by a delimiter and choose whether to split at the left-most, right-most, or each occurrence, depending on the available split settings. That is often clearer than trying to make a simple split do a selective job. The exact choice should reflect the data rule: first hyphen, last hyphen, or every hyphen.
Use Power Query for repeated imports
Power Query is useful when you repeatedly receive files with the same layout and want to apply the split again after refreshing. In desktop Excel, convert the source range to a table or select a cell in it, then choose Data > From Table/Range. In the Power Query Editor, select the column and choose Home > Split Column > By Delimiter. Set the hyphen as the delimiter, choose the split option that fits the data, and confirm.
When the transformation is ready, use Home > Close & Load to return the results to Excel. For a later file with the same structure, replace or update the source and refresh the query. Power Query keeps the transformation steps, unlike Text to Columns, which changes the current cells directly. It is therefore a good fit for routine cleanup, but it introduces a query workflow that may be unnecessary for a short list you will process only once.
Common problems and ways to prevent them
- Nothing splits: Confirm that the delimiter is the same character as the one in the data. A hyphen-minus (
-), en dash (–), and em dash (—) look similar but are not interchangeable. - Existing values disappear: Text to Columns writes into neighboring cells. Undo immediately if appropriate, or restore from a saved copy; safer practice is to select a blank destination before finishing.
- A formula reports a spill error: Clear cells in the area where the split results need to appear. Also check for merged cells in that output area.
- Leading zeroes vanish: A segment such as
007may be interpreted as a number in some workflows or later formatting. If it is an identifier, preserve it as text and check the result before using it. - The number of output columns varies: Some rows have more delimiters than others. Make room for the maximum expected number of pieces and decide how empty pieces should be treated.
- Dates or codes change appearance: A split can expose segments Excel interprets as numbers or dates. Review the preview or the final output and use a text format where the content is an identifier rather than a quantity.
Which method is best?
For a one-time split of a clean column, Text to Columns is usually the fastest because it requires no formula and is easy to inspect in the wizard. Use TEXTSPLIT if the original value may change or if you want the source and result to remain separate. Use Power Query when the same imported data-cleaning steps must be repeated. Flash Fill is most useful when the desired output is a pattern, such as extracting the first code segment, and not simply dividing at every hyphen.
Consider the number of rows, whether the data is refreshed, and whether blanks between repeated delimiters carry meaning. For a small sample, test the method on a copy first. Compare the split pieces with the original values and confirm that the longest entries, unusual dash characters, and empty segments behave as expected.
Frequently Asked Questions
Can Excel split a cell at every hyphen?
Yes. Use Data > Text to Columns with Other set to a hyphen, or use TEXTSPLIT in Microsoft 365 or Excel 2024. Both approaches can divide a value at each occurrence.
How do I split text at the first hyphen only?
A basic Text to Columns split or TEXTSPLIT formula separates every occurrence. For a quick custom result, try Flash Fill with examples; for a repeatable process, use Power Query’s delimiter split options and select the left-most occurrence.
Will the split update when I edit the original cell?
Text to Columns and Flash Fill create fixed values, so they do not automatically update. A TEXTSPLIT formula recalculates when its source changes, provided its spill range remains clear.
Can I split by a hyphen in Excel for Mac?
Desktop Excel for Mac also includes Text to Columns, though the ribbon appearance may differ from Windows. TEXTSPLIT is available in Microsoft 365 and Excel 2024; confirm that the installed version supports it.
Why does Excel not recognize the hyphen I entered?
The source may use an en dash or em dash instead of the ordinary hyphen-minus. Copy the exact separator from the cell, or standardize the characters before splitting.
Related
- How to Compare Two Excel Sheets
- Excel Not Responding: How to Unfreeze It Safely
- How to Undo a Circular Reference in Excel Step by Step
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Parallel Box Plot in Excel: Create and Read OneTo make a parallel box plot in Excel, put each group’s numeric observations in a separate column, select…
- Google Sheets vs Excel: How Similar Are They?Google Sheets and Microsoft Excel are highly similar for everyday spreadsheet work: both organize information in cells, calculate…
- Insert Rows and Columns in Excel: Shortcuts & StepsIn Excel for Microsoft 365 on Windows, select a row with Shift+Space or a column with Ctrl+Space, then…
- Excel Keyboard Shortcut to Resize a Column or AutoFitIn Excel for Microsoft 365 on Windows, select a cell in the column and press Alt, H, O,…
- Google Sheets Apps Script Tutorial: Automate Everyday TasksGoogle Sheets Apps Script is Google’s JavaScript-based tool for automating spreadsheets. To start, open a sheet in a…
- Family Tree Template in Word: Create and Customize OneTo create a family tree template in Microsoft Word, set the page to landscape, add editable boxes for…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.