Extract Text Before or After the 1st, 2nd, 3rd, Nth Delimiter in Excel

Поделиться
HTML-код
  • Опубликовано: 7 фев 2025

Комментарии • 51

  • @avantgarde7956
    @avantgarde7956 4 года назад +4

    By far, the most enjoyable tutorial on Excel formulaes..

  • @lindabeaudry8933
    @lindabeaudry8933 3 года назад +1

    I have been looking for explainations on formulas for years and now I finally understand them. You are the best.

  • @FLPanhandle
    @FLPanhandle 3 месяца назад

    Good explanations of the functions involved, and how they operate in the formulas. Nice to see you mention the colors of the () as well. They are immensely helpful in long formulas.
    I have never seen anyone use the substitute function the way you do. Interesting, but I would like to see a case where it is of benefit. My formulas work just fine without the substitutions.
    What is puzzling is that if you use SEARCH rather than FIND in your formulas, they often return errant results or an error. The difference is FIND is case sensitive, and SEARCH is not. I don't see why SEARCH fails at times.
    I'm glad you instructed on how to use F9 as it is a powerful tool for interpreting formulas and their results. You can simply hit the ESC key to undo the results of F9, unless you've hit Enter. Then you need Control-Z.
    This "/" is a slash.
    This "\" is a backslash, not a slash as you described.

  • @heglem
    @heglem 4 года назад +1

    You are a life savior my friend! Thank you so much for the video and for providing the example file as well!

  • @linwang6975
    @linwang6975 3 года назад +1

    I have inspired by your explanation. You are a great excel coach!

  • @nairrs6030
    @nairrs6030 Год назад

    Thanks for the guidance. love from kerala ,india.

  • @lifeofkiran6285
    @lifeofkiran6285 3 года назад +1

    you were a god send man thank you !!! did my interview tasks well

  • @wayneedmondson1065
    @wayneedmondson1065 5 лет назад

    Great use of SUBSTITUTE, FIND, LEN, LEFT, RIGHT, etc. Comes in handy with CELL("filename") function to dynamically grab the path or extract the filename of a workbook into a worksheet. Thanks for sharing this technique. Thumbs up!

  • @TheChico
    @TheChico 3 года назад +1

    Could not understand very well the ~ is doing, but this works for what I needed to do :) thanks!

    • @mr_shanes
      @mr_shanes 3 года назад +1

      the tilde character is a replacement placeholder which you will then use to extract everything before or after. as mentioned in video it must NOT be a character that is in the data string, if necessary then use a couple of characters that together are not in the string, for example "~#$@" all together is doubtful to be found in any recognisable string.

  • @nakulprajapati512
    @nakulprajapati512 Год назад

    Best solution. Thank you.

  • @irishikr
    @irishikr 4 года назад

    You are a life saviour DEAR!

  • @jvanh50
    @jvanh50 3 года назад

    really awesome video! Would love to see how you would recommend extracting the string between the 2nd and 3rd delimiter.

    • @TeachExcel
      @TeachExcel  3 года назад

      Hi Joe, please upload sample values and ask in the forum and it will be much easier to help you with a nice formula: www.teachexcel.com/talk/microsoft-office?src=yt_comment

  • @gameon3602
    @gameon3602 Год назад

    Life saver you are

  • @jigarfaria
    @jigarfaria Год назад

    Superb. Thanks for the video.

  • @arnauddu9387
    @arnauddu9387 3 года назад

    Lifesaver you are my friend, thanks so much :)

  • @mikun999
    @mikun999 5 лет назад +1

    The best, the best, the best. I love it

  • @swathireddy2817
    @swathireddy2817 3 года назад

    Can we extract the data from a text file based on nth delimiter basically splitting a file based on the delimiter and also the size

  • @jirawatpanda4094
    @jirawatpanda4094 2 года назад

    Amazing-Excel

  • @vmc1496
    @vmc1496 3 года назад

    excellent sir

  • @husain_johar
    @husain_johar 4 года назад +1

    How about the middle string? What will be the formula to just extract
    "Another Dir" removing the left and right characters

  • @animosityjrc
    @animosityjrc 4 года назад +4

    Really helpful tutorial. My only nag is that you have to know which instance the last delimiter is at and change the instance number. But what if all of your directory paths have a different number of "\" characters, and I want to tell Excel to "find me the last one?"
    I tested this out using:
    C:\Dir\Another Dir\Some File\Example.xlsx
    C:\Dir\Another Dir\Some File.xlsx
    C:\Dir\Another Dir.xlsx
    And I got:
    =FIND("~",SUBSTITUTE(A1,"\","~",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))
    This will always find the final instance of the delimiter without having to know or count it. Thus, we have:
    =RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1,"\","~",LEN(A1)-LEN(SUBSTITUTE(A1,"\","")))))
    Dragging this formula down column B will yield:
    Example.xlsx
    Some File.xlsx
    Another Dir.xlsx

  • @kameshsharma5164
    @kameshsharma5164 4 года назад

    Thanks sir, very helpful video. But I want to know whether we can extract more than one word. You have taught to extract one word from the middle of a line, in this video, but I want to get more than one word from a line.

    • @TeachExcel
      @TeachExcel  4 года назад

      Kamesh, you can extract as much as you want! But, the formula might end up a bit interesting. Go ahead and ask this question in our forum on TeachExcel and include a description of exactly what you are trying to do and any progress that you made so far and we can get you a formula :) Forum: www.teachexcel.com/talk/microsoft-office?src=yt_comment

    • @kameshsharma5164
      @kameshsharma5164 4 года назад

      @@TeachExcel
      Sir, I request you to please make a formula in which I can extract two or three words from the middle of the line of a cell in Excel. I have made different formulas for both, but I am not able to form a formula by mixing them both. I am sharing both those formulas with you. You are requested to mix these two and make a formula so that I can extract two or three or four words from a line in a cell. Please Please
      (To extract one word from mid of line)
      =Trim(MID(SUBSTITUTE(B6," ",REPT(" ",LEN(B6))),(C6-1)*LEN(B6)+1,LEN(B6)))
      (To extract 2 or 3 word from the starting of the line)
      =TRIM(LEFT(B1,FIND("~",SUBSTITUTE(B1," ","~",A1)&"~")))

  • @niya581
    @niya581 4 года назад

    Very helpful

  • @valeriabarboza2807
    @valeriabarboza2807 3 года назад

    How do I get a middle text like \Another Dir\ ?

  • @piersondsouza8778
    @piersondsouza8778 2 года назад

    What if I have to get "Another Dir"

  • @pramodparnami6012
    @pramodparnami6012 3 года назад

    That 'Swigle' above the Tab button and beside '1' button is called *Tilde*

  • @gabrielcarrillo2650
    @gabrielcarrillo2650 4 года назад

    Thank you!

  • @sandeepsupekar9077
    @sandeepsupekar9077 4 года назад

    what is excel formula to split value from AAAA+BB+CC to AAAA AABB and AACC

  • @Sandeepkol3
    @Sandeepkol3 2 года назад

    SRVKOL/236/22-23
    SRVKOL/5389/22-23
    SRVKOL/2/22-23
    SRVKOL/58/22-23
    I want to extract only numbers (i.e., 236, 5389, 2, 58) using formula. Please advise. Thanks

  • @terecastillo392
    @terecastillo392 3 года назад

    Hi friend! I tried the last formula but I can´t , or it doesnt work with "-" , this is the complete sentence : AP - hi how are you - window and i tried with this formula : =RIGHT(C1,LEN(C1)-FIND(" - ",SUBSTITUTE(C1," - "," ~ ",2))) and is no working pleaseee help me

  • @quintoncarroll7070
    @quintoncarroll7070 3 года назад +1

    How can you extract multiple occurrences? For example, I am trying to extract all occurrences of the word "Scale"? In this example, Methods: Cross-sectional descriptive survey of 447 US RNs using five reliable and validated measures of presenteeism: Stanford Presenteeism Scale (SPS), Job-Stress-Related Presenteesim Scale (JSRPS), Healthcare Productivity Scale (HPS), Nurses Work Functioning Questionnaire (NWFQ), and Health and Work Questionnaire (HWQ). The survey was evaluated using descriptive, exploratory, and confirmatory factor analysis.

  • @paradmshft
    @paradmshft 2 года назад

    What if I have multiple pieces of data between multiple delimiters? i.e., xxx.xxxxx.xxxxxxxx.xxx.x.xxxx.x and I want to get data out to cells without using the text to column feature, but rather using a formula, to extract each piece of data so xxx then in the next column xxxxx then xxxxxxxx then xxx then x then xxxx then x from left to right?

  • @dustinsmith2794
    @dustinsmith2794 4 года назад

    can you do this and pull the text string between 2 of the "\"...i.e I want to pull the "Another Dir" via formula

  • @mohammadghufrankhan6579
    @mohammadghufrankhan6579 5 лет назад

    Monitum: 28 dec 2019 16:07:52: auto RSP issue~monitum: 10 jan 2020 14:18:47 : ~vibhanshu singh bharti: 10 jan 2020 17:02:32 : monitor not working properly~

  • @markjoseph2423
    @markjoseph2423 2 года назад

    Hello can you help me fot my project? I want to extract the first 2 words of the file name. And if the first word is numbers. I want to extract the next 2 words to it. Pls help. I can pay thru paypal.

  • @zaymarhenriquez-sedra2720
    @zaymarhenriquez-sedra2720 Год назад

    It does not work for me ::(

  • @kameshsharma5164
    @kameshsharma5164 4 года назад

    Sir, I request you to please make a formula in which I can extract two or three words from the middle of the line of a cell in Excel. I have made different formulas for both, but I am not able to form a formula by mixing them both. I am sharing both those formulas with you. You are requested to mix these two and make a formula so that I can extract two or three or four words from a line in a cell. Please Please
    (To extract one word from mid of line)
    =Trim(MID(SUBSTITUTE(B6," ",REPT(" ",LEN(B6))),(C6-1)*LEN(B6)+1,LEN(B6)))
    (To extract 2 or 3 word from the starting of the line)
    =TRIM(LEFT(B1,FIND("~",SUBSTITUTE(B1," ","~",A1)&"~")))

  • @kvphanimadhav6359
    @kvphanimadhav6359 5 лет назад

    Hey Great Video to extract the needed. However I feel in sharing the below add-on where in every time that we are selecting the number of "\" character in the formula used. We can replace that part by using "=RIGHT(G25,LEN(G25)-FIND("~",SUBSTITUTE(G25,"/","~",LEN(G25)-LEN(SUBSTITUTE(G25,"/","")))))".

    • @mr_shanes
      @mr_shanes 3 года назад +2

      your formula returns everything after the last occurrence, and that can be done with the shorter: =TRIM(RIGHT(SUBSTITUTE(G25,"/",REPT(" ",LEN(G25))),LEN(G25)))

  • @mushfiqulislam8898
    @mushfiqulislam8898 3 года назад

    i want to contact with you

    • @TeachExcel
      @TeachExcel  3 года назад

      Click the Contact link at the top of my website: TeachExcel.com

  • @mohammadghufrankhan6579
    @mohammadghufrankhan6579 5 лет назад

    How extract from VIBHANSHU SINGH BHARTI from this column
    Please help

  • @FRANKWHITE1996
    @FRANKWHITE1996 5 лет назад

    +1