Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to extract text before or after dash from cells in Excel?

Most of us may like to use the dash separator to separate the contents within a cell, but, sometimes, we need to extract the text string before or after the dash for some purpose as following screenshot shown. How could you extract the text before or after the dash from cells at once in Excel?

doc extract after dash 1

Extract text before or after dash with formulas

Extract text before or after dash with Text to Columns feature

Extract text before or after dash with Kutools for Excel


Split Cells into multiple rows or columns by specific separator:

Kutools for Excel’s Split Cells feature can help you quickly split one column text strings to multiple columns or rows based on specific separator, such as comma, space, new line and so on…

doc extract after dash 15 15

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!



To extract the text string before or after a dash, the following simple formulas may help you.

Extract text before dash:

Please enter this formula: =LEFT(A2,FIND("-",A2)-1) into a blank cell besides your data, see screenshot:

doc extract after dash 2

And then drag the fill handle down to the cells that you want to apply this formula, you can see all text before the dash has been extracted from the cell:

doc extract after dash 3

Extract text after dash:

Type this formula: =REPLACE(A2,1,FIND("-",A2),"") into a blank cell, then drag the fill handle to the range of cells that you want to contain this formula, and all the text after the dash has been extracted as follows:

doc extract after dash 4  2 doc extract after dash 5

Tips: In above formulas, A2 is the cell you need to extract text from, you can change it as you need.


In Excel, the Text to Columns feature also can help you to split the cell content from one cell into two cells separately by the dash.

1. Select the data range that you want to split by dash.

2. Click Data > Text to Columns, see screenshot:

doc extract after dash 6

3. In step 1 of the Convert Text to Columns Wizard, select Delimited option, see screenshot:

doc extract after dash 7

4. And then click Next button, in step2 of this wizard, check Other option under Delimiters section, and enter the dash (-) symbol into the text box, see screenshot:

doc extract after dash 8

5. And then click Finish button, the selected cells have been split into two columns by the dash. See screenshots:

doc extract after dash 9  2 doc extract after dash 10

Kutools for Excel’s Split Cells feature may help you split the cell contents into multiple columns or rows by any separators, such as comma, dash, carriage return, etc.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days

After installing Kutols for Excel, please do as follows:

1. Select the data range that you want to extract the values before or after the dash.

2. Then click Kutools > Text > Split Cells, see screenshot:

doc extract after dash 16 16

3. In the Split Cells dialog box, select Split to Columns under the Type section, and then enter the dash into the Other text box under the Specify a separator, see screenshot:

doc extract after dash 17 17

4. Then click Ok button, and another prompt box will pop out to remind you select a cell where you want to put the result, see screenshot:

doc extract after dash 18

5. And then click OK, the cell values in cells have been split into two columns by dash. See screenshot:

doc extract after dash 19

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  • Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  • Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  • Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  • No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  • Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  • Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Ian · 3 years ago
    I love you! This is exactly what I was looking for, you geniuses!