Simple Excel Function to Extract Any Word from a Cell - UDF

Excel File: www.teachexcel.com/excel-tuto...
Excel Forum: www.teachexcel.com/talk/micro...
I'm giving you an amazingly simple function that will allow you to quickly and easily extract any word from any cell in Excel.
You can get the first word, last word, or any word in-between with ease.
This does use a UDF (User Defined Function), but don't worry, I explain how to install the UDF, it's very easy, just copy-paste, and then I will show you how to use it and how everything inside the UDF works, since it is actually a VBA macro.
I hope you guys like this tutorial and, if you have any questions, let me know here or on the forum, linked to above.
TeachExcel.com

Пікірлер: 39

  • @wayneedmondson1065
    @wayneedmondson10655 жыл бұрын

    Great simple UDF to get the job done.. excellent! Here is my version.. tinkered with it a bit.. just for the practice. It gives the user some in-Cell feedback if wrong delimiter or word position out of range: Function Extract_Text(Search As String, Delim As String, Position As Integer) Dim arr() As String arr = Split(Search, Delim) If Position UBound(arr) + 1 Or InStr(Search, Delim) = 0 Then Extract_Text = "ERROR! - Syntax is: Extract_Text(Search, ""Delim"", Position)" Else Extract_Text = arr(Position - 1) End If End Function Thanks for the inspiration to create. Thumbs up!

  • @TeachExcel

    @TeachExcel

    5 жыл бұрын

    You're very welcome and thanks for watching! In your udf, I Love the idea of outputting the correct syntax along with the error in a udf!!!! I never thought of that and it really is a great way to make sure a user is aware of the syntax. Also, it's great to see different ways to do the same thing.)

  • @KBalajiB.ComCommercialHero
    @KBalajiB.ComCommercialHero11 күн бұрын

    very useful sir thanks

  • @sergiosoares7588
    @sergiosoares75882 жыл бұрын

    Thank you, you are extremely helpful and clear understanding. Look forward to using you in the future.

  • @didasssendagi9023
    @didasssendagi90233 жыл бұрын

    Thanks, this has eased my work. Its an amazing work out.

  • @Livia-cl2gy
    @Livia-cl2gy2 жыл бұрын

    You made my job easier. Thank you!!!

  • @winteriscoming4407
    @winteriscoming44072 жыл бұрын

    Thank you! the code helps me a lot

  • @waisans
    @waisans3 жыл бұрын

    Hi good day TeachExcel...this video is amazing for me...thanks for your kind sharing ^^

  • @saifalsalihee
    @saifalsalihee Жыл бұрын

    Thanks , very useful

  • @sachinrasanjana7242
    @sachinrasanjana7242 Жыл бұрын

    sweeeeeeet...... love you..!! exactly what i need

  • @emmywong8093
    @emmywong80933 жыл бұрын

    Thank you

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    You're welcome Emmy)

  • @poorsweatybastard
    @poorsweatybastard5 жыл бұрын

    Very nice. Thanks. A simple Excel version of UNIX cut -d.

  • @TeachExcel

    @TeachExcel

    5 жыл бұрын

    Its funny/very annoying how every language has a simple version of this but they didn't put it into an Excel formula by default!

  • @gauravtayal7143
    @gauravtayal71432 жыл бұрын

    I want to extract characters between given characters or symbols range

  • @irshadbaruah7961
    @irshadbaruah79612 жыл бұрын

    how can i extract keywords and create a frequency distribution table in descending order, if I have thousands of data and lets say 4-5 different keywords

  • @ivank1469
    @ivank14693 жыл бұрын

    How do you extract a string from another string, such as 'bbb' from unstructured strings 12bbb4ty and 1w3bbbrt5? We need to match that somehow and then take it out and this is the regex kind of function. Is something like that an option in Excel? Either way, thanks for help 🙏!

  • @waynefrancis5843

    @waynefrancis5843

    3 жыл бұрын

    @Briar Mario Yea, been watching on Flixzone} for months myself :D

  • @bradygrady7787

    @bradygrady7787

    3 жыл бұрын

    @Briar Mario Definitely, have been using flixzone} for years myself :D

  • @sazerx5741
    @sazerx5741 Жыл бұрын

    Hi i wanted to hget many words in a column from a one self define command??

  • @Pritam.Bhagat
    @Pritam.Bhagat5 жыл бұрын

    That's v g8 🙏

  • @TeachExcel

    @TeachExcel

    5 жыл бұрын

    Thanks :)

  • @amyhowardmiller8328
    @amyhowardmiller83285 жыл бұрын

    Is there a variation of this that will allow me to pull all email addresses out of a spreadsheet that has them in various cells and columns?

  • @TeachExcel

    @TeachExcel

    5 жыл бұрын

    Not really - you need a macro for this that will search the entire spreadsheet, identify an email address and then copy/paste it somewhere. This is a bit of a process. You can ask for help doing this on our forum or paid help via the Contact section if you like - www.teachexcel.com

  • @jamesashmead6308
    @jamesashmead63082 жыл бұрын

    This is amazing, thank you. Anyway to stop #Value! When there is no word. So get word on 4th occurance but there is no word so it returns #Value!. Some sentences are 5 words long, some only 3.

  • @estrellita6851
    @estrellita68513 жыл бұрын

    I'm needing to create customer ID using first 3 letters of name and 3 letters of last name as a customer id.. example John Murphy = johmur How can I do that?

  • @nayanparmar9127
    @nayanparmar91272 жыл бұрын

    how to extract letter form a word or number? for example the word is "Phenomenon " & I need to extract forth letter from this word that is "N" is this possible in excel??????????????

  • @sharonraz542
    @sharonraz5423 жыл бұрын

    Is it possible to save these UDF on every excel workbook?

  • @RadioChatRO

    @RadioChatRO

    3 жыл бұрын

    yes

  • @italianstallion7539
    @italianstallion75392 жыл бұрын

    what if you have approx 277 vendors and you need to extract just the vendor names from the journal line description

  • @ISAOHJSAMURAI
    @ISAOHJSAMURAI3 жыл бұрын

    Hi. I have to extract 15 different words from 5 thousands cells "with different sentences" "in different order". Each cell contains one or two of these 15 words. Therefore your formula doesn't work as each cells are very different. Is there ar formula that can extract the mach word(s)? For example, if the 15 words are, apple, orange, lemon, etc, a formula like =Get_word(cell, "apple", "orange",,,,) and if matches one word, just leave it like "apple".

  • @davidsookharry8555
    @davidsookharry85553 жыл бұрын

    I m guessing this will work for dates as well

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Probably not - it depends how your dates are in excel. But you can use DAY() MONTH() YEAR() functions to get the parts of a date.

  • @christianmontanogalvez1279
    @christianmontanogalvez1279 Жыл бұрын

    the problem is, what if in the second row the word awesome is now the 5th word instead of 4th.

  • @seandungan5386
    @seandungan53864 жыл бұрын

    Is there a way to get more than one word? I have 1500 pus products and not every 7th word is what I need

  • @kalawangdude

    @kalawangdude

    4 жыл бұрын

    This! I have the same problem.

  • @alameenameen1030
    @alameenameen10303 жыл бұрын

    I couldnt find the formula get word in excel.. Why?

  • @kameshsharma5164
    @kameshsharma51643 жыл бұрын

    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)&"~")))

  • @TeachExcel

    @TeachExcel

    3 жыл бұрын

    Karmesh, please ask your question in our forum and include your formulas there and, if it helps, include a sample file. Comments here are difficult to use to solve problems - I am replying only to this comment and not your others, although it was a good technique to get me to notice you, though not as good as asking in the forum ;) www.teachexcel.com/talk/microsoft-office?src=yt_comment