- To post as a guest, your comment is unpublished.· 9 months agoHello, Nimesh,To extract the text after or before a specific text, please apply the below formulas:After a text: =TRIM(MID(A2,SEARCH("and",A2)+LEN("and"),255)) (replace the text "and" to your own)Before a text: =LEFT(A2,FIND("and",A2)-1)
- To post as a guest, your comment is unpublished.· 4 months agoWhat if I want to extract only one word between two specific words from a sentence?
- To post as a guest, your comment is unpublished.· 9 months agoHello,Thank you for response.Exactly, I want to extract only one word after or before a specific word from the sentence.Is it possible?Thank You...
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?
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:
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:
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:
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:
3. In step 1 of the Convert Text to Columns Wizard, select Delimited option, see screenshot:
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:
5. And then click Finish button, the selected cells have been split into two columns by the dash. See screenshots:
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 > Merge & Split > Split Cells, see screenshot:
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:
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:
5. And then click OK, the cell values in cells have been split into two columns by dash. See screenshot:
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 9 months agoHello,I want to know that how to extract text or word before or after particular text or word?Kindly help me in this case.Thank You...
- To post as a guest, your comment is unpublished.· 2 years agoHow do I pull the one word before a dash and after a space? Example..
Jane Doe-is and excellent person
Jane Sue Doe-is an excellent person
Jane Smith-Doe-is an excellent person
I only want the word "Doe" pulled from the cell.
- To post as a guest, your comment is unpublished.· 6 years agoI love you! This is exactly what I was looking for, you geniuses!