Note: The other languages of the website are Google-translated. Back to English
Log in  \/ 
x
or
x
Register  \/ 
x

or

How to extract string between two different characters in Excel?

If you have a list of string in Excel which you need to extract part of string between two characters from as below screenshot shown, how to handle it as quickly as possible? Here, I introduce some methods about solving this job.

Extract part string between two different characters with formulas

Extract part string between two same characters with formulas

Extract part string between two characters with Kutools for Excelgood idea3


Extract part string between two different characters with formulas

To extract part string between two different characters, you can do as this:

Select a cell which you will place the result, type this formula =MID(LEFT(A1,FIND(">",A1)-1),FIND("<",A1)+1,LEN(A1)), and press Enter key.
doc extract string between two characters 1

Note: A1 is the text cell, > and < are the two characters you want to extract string between.


Extract part string between two same characters with formulas

If you want to extract part string between two same characters, you can do as this:

Select a cell which you will place the result, type this formula =SUBSTITUTE(MID(SUBSTITUTE("/" & A3&REPT(" ",6),"/",REPT(",",255)),2*255,255),",",""), and press Enter key.
doc extract string between two characters 2

Note: A3 is the text cell, / is the character you want to extract between.

Extract part string between two characters with Kutools for Excel

If you have Kutools for Excel, you also can extract part string between two texts.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select a cell which will place the extracted string, then click Kutools > Formula > Formula Helper.
doc extract string between two characters 3

2. In the Formula Helper dialog, .check Filter checkbox, then type "ex" into the textbox, all formulas about extracting will be list in Choose a formula section, choose Extract strings between specified text, then go to right Arguments input section, select the cell which you want to extract substring from into Cell, then type the two texts you want to extract between.
doc kutools extract string between two texts 2

3. Click Ok, then the substring between two texts you specified has been extracted, drag fill handle down to extract subtring from each cells below.
doc kutools extract string between two texts 3

doc kutools extract string between two texts 4


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest
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.
    britech · 13 days ago
    [A:174, Theater Street, Harbin, 78485][N:A H Hoteles][I:HID-535342][N:45.00€][C:32156][C:Category_4]

    How I extract 45.00e or 32156? Thanks so much
    • To post as a guest, your comment is unpublished.
      Sunny · 9 days ago
      Hi, britech, I do not understand your question. Do you mean to extract 45.00e and 32156 seperately from this long string:[A:174, Theater Street, Harbin, 78485][N:A H Hoteles][I:HID-535342][N:45.00€][C:32156][C:Category_4]? Is all your data in the same length and format? Please give me more details, thank you.
  • To post as a guest, your comment is unpublished.
    graytech · 5 months ago
    So first of all, thanks for the formula. It helped. How, I am wanting to format the output a bit. I have a cell in Excel that has this link in it: --> https://www.google.com/search?q=how+to+create+hyperlink+in+excel+cell&oq=how+to+create+hyperlink+in+excel+cell&aqs=chrome..69i57.7896j0j15&sourceid=chrome&ie=UTF-8 <--

    I need to format the output to remove and replace the "+" with a space. How can I modify the above formula to add formatting as well?
    • To post as a guest, your comment is unpublished.
      Sunny · 22 days ago
      Hi, graytech, you can use the Find and Replace function. Select the cell you use, press Ctrl + H keys to enable the Find and Replace dialog, then type + into the textbox of Find_what, type a space into the textbox of Replace_with, click Replace All button.
  • To post as a guest, your comment is unpublished.
    Oleg · 8 months ago
    Let say I have a formulate like the one below in a cell. And I wish to do a search function with Formulatext to find "oper" and then extract the number before and after the "*". Is it possible to do that in excel?

    =(1*LABFSW*4+4*LABSW*8+1*OPER14SW*8+1*TEAMSW*8)/H35



    • To post as a guest, your comment is unpublished.
      Sunny · 7 months ago
      Hi, Oleg, do you mean to extract all numbers before and after the text "oper"? If so, sorry I have no idea.
  • To post as a guest, your comment is unpublished.
    Terry · 9 months ago
    Hello! That magical formula worked for me! Thanks a lot :)
  • To post as a guest, your comment is unpublished.
    Matt · 9 months ago
    Hello, unfortunately the formula is not working for me. I have my base text as: {"results":[{"id":0,"value":"TEXTA"},{"id":1,"value":"TEXTB​​​​​"}]}. I want a single formula that will extract TEXTA, with TEXTA as an unknown length. How can I do this? Thanks

    • To post as a guest, your comment is unpublished.
      Sunny · 9 months ago
      Hello, Matt, you mean you need to extract the string between the forth "" characters? If so, sorry that is no formula I can find to solve.
  • To post as a guest, your comment is unpublished.
    mohamed abdelraouf · 1 years ago
    i had cell had numbers & characters ( 2 doll ; 5 boy toy ; 4 lines ) in need to extract 5 boy toy from this cell

  • To post as a guest, your comment is unpublished.
    Bret · 1 years ago
    How would I extract something between two symbols, but with multiple identical symbols.Example: say A2 is the following: David~Spanish~Texas~0534~Eighth~3421. Say I wanted to extract "Texas" or the third entry in the string. Is that even possible?
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Hi, Bret, you can try the formulas to extract substring.
      FIND("~",O1,FIND("~",O1,FIND("~",O1)+1)+1) to find the position of the third ~ in the string
      FIND("~",O1,FIND("~",O1,FIND("~",O1,FIND("~",O1)+1)+1)+1) to find the psition of the forth ~ in the string
      MID(O1,P1+1,Q1-P1-1) extracts substring between third ~ and forth ~.
  • To post as a guest, your comment is unpublished.
    Luke · 1 years ago
    In the section "Extract Part String Between Two Same Characters With Formulas";
    I am trying to make a formula that extracts text after two of the same characters, i.e. extract text after / and / (which would be Judy in this case).
    This is what I've got so far;
    =TRIM(MID(Actions!C2,FIND(";",SUBSTITUTE(Actions!C2,";";",3))+1,255))

    Any Tips, would be appreciated?
  • To post as a guest, your comment is unpublished.
    jal · 1 years ago
    how to get this between this character and refer to?
    Example: 12345D76765
    I want to get that "D" and this D is refer to "Daily"
  • To post as a guest, your comment is unpublished.
    Saravana Kumar · 2 years ago
    Hi,

    U21-CMI0001-1A


    How to get this between this character "CMI0001"?
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Hi, I do not understand your question. Do you want to extract CMI0001 from U21-CMI0001-1A or want to convert CMI0001 to U21-CMI0001-1A?

      Extract: =MID("U21-CMI0001-1A",5,7)
      if
      Convert: ="U21"&"-"&"CMI0001"&"-"&"1A"