How To Use the new Excel TEXTBEFORE & TEXTAFTER Functions to Save Time on Your Next Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ค. 2024
  • Join 400,000+ professionals in our courses here 👉 link.xelplus.com/yt-d-all-cou...
    Extracting certain parts of a text in a cell in Excel wasn't easy. Microsoft recently updated the new TEXTBEFORE and TEXTAFTER functions to make them even more useful. If you need to extract text that occurs before or after a given character or string - this is your solution! I also show you an Excel trick you can use to avoid needing to use nested functions to extract the last delimiter. These new functions also got an update and have more optional arguments you can use. I'll show you how to that in the video.
    ⬇️ DOWNLOAD the workbook here: pages.xelplus.com/textbefore-...
    Key Highlights:
    TEXTBEFORE: Extracts text before a specified delimiter, and you can customize the instance number, match mode, and result if not found.
    TEXTAFTER: Retrieves text after a designated delimiter, offering similar options for customization.
    Bonus Trick: Learn how to efficiently extract text in reverse order by using negative instance numbers and match to end, making it dynamic and flexible.
    🌍 My Online Courses ► www.xelplus.com/courses/
    00:00 Extract Text - Split Names in Excel
    01:18 TEXTBEFORE
    03:53 Bonus Trick
    05:36 TEXTAFTER
    07:03 Wrap Up
    🎬 LINKS to related videos:
    - New Excel TEXTSPLIT Function to Separate words with Ease: • New Excel TEXTSPLIT Fu...
    - Breaking News! We FINALLY get the Excel functions we've been Wanting: • Breaking News! We FINA...
    ➡️ Join this channel to get access to perks: / @leilagharani
    👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/
    🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.com/course-quiz/
    🎥 RESOURCES I recommend: www.xelplus.com/resources/
    🚩Let’s connect on social:
    Instagram: / lgharani
    LinkedIn: / xelplus
    This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
    #Excel

ความคิดเห็น • 269

  • @LeilaGharani
    @LeilaGharani  4 หลายเดือนก่อน

    Grab the file I used in the video from here 👉 pages.xelplus.com/textbefore-file

  • @zzota
    @zzota ปีที่แล้ว +64

    You can also combine them to grab a middle element: =TEXTBEFORE(TEXTAFTER(B8, " "), " ")

  • @reneberthet9168
    @reneberthet9168 ปีที่แล้ว +41

    That -1 was an aha moment for me! I appreciate you demonstrating the different aspects of the functions so we see how it works. Thank you for your videos! 👍

  • @muminatiah547
    @muminatiah547 11 วันที่ผ่านมา

    Amazing as usual, really thanks

  • @christosmylonas
    @christosmylonas ปีที่แล้ว +9

    You are a great consultant and teacher at the same time!

  • @roywilson9580
    @roywilson9580 ปีที่แล้ว +2

    It is about time we had some easy to use text functions! I wish they had been available 5 years ago when I was working on a project that included a lot of text manipulation.

  • @joeismael9359
    @joeismael9359 ปีที่แล้ว

    Thank you Leila, I now understand how some formula works by watching your vidoes 😁😁😁

  • @McKaySavage
    @McKaySavage ปีที่แล้ว

    Very helpful! Thanks! The search from end argument of these new functions really improves the functionality

  • @jerry5149
    @jerry5149 หลายเดือนก่อน

    Your presentations are so professional, it's astounding!

  • @smartphoneuser791
    @smartphoneuser791 ปีที่แล้ว

    Excellent. You made it very simple. Thank you very much.

  • @DamiantenBohmer
    @DamiantenBohmer 11 หลายเดือนก่อน

    THANK YOU SO VERY MUCH, this short formula saved me so much work 😂😂😂

  • @edilpoulina1870
    @edilpoulina1870 ปีที่แล้ว

    This is an awesome trick Leila. Thanks!

  • @tonybkent
    @tonybkent ปีที่แล้ว

    Excellent! I could have used that yesterday to separate the different parts from an email address. I've always used left / right / len and find instead, but this is much simpler! Thanks!

  • @AndreaUK1973
    @AndreaUK1973 ปีที่แล้ว +2

    Thanks Sweetie! So glad you test it many times until you find a better way to show us!! Thank you!! It’s not easy to understand the arguments and I think that’s why it puts many people off using some excel functions! As we are constantly under pressure of deadlines, we can’t stop to understand it! That’s why I spend my free time watching your videos!! 😂

  • @moonglumclampflower8803
    @moonglumclampflower8803 ปีที่แล้ว

    Really helpful. Very clear. Thanks.

  • @bajantraian
    @bajantraian 10 หลายเดือนก่อน

    Hi Leila! Thank you for your videos; they have helped me tremendously at work and in school. I like the way you explain things : easyto comprehend and to the point, with examples! Love you !

  • @malcbatotony9518
    @malcbatotony9518 ปีที่แล้ว

    Greatly appreciate the knowledge sharing. Thank you so much

  • @leoceoliveira
    @leoceoliveira ปีที่แล้ว

    Very cool! Useful video

  • @ruthhernandez7295
    @ruthhernandez7295 ปีที่แล้ว

    Thank you I learned something new today.

  • @g.r.2985
    @g.r.2985 ปีที่แล้ว

    Love your take on the Austrian system!! Gold! That "Eva". eh!! What a "mega collector"!!

  • @ethofmeyr
    @ethofmeyr ปีที่แล้ว

    Always worth watching! Today I even thought, yeah I already know those, maybe I skip this time; but I had no idea about the bonus tip and that could have helped me yesterday. Thank you Leila

  • @JeffPospisil
    @JeffPospisil ปีที่แล้ว

    This was so awesome! Thank you! I always dreaded the LEFT() FIND() LEN() mess of doing this.

  • @gerbherb8215
    @gerbherb8215 3 หลายเดือนก่อน

    Nice! Thank you.

  • @Riri-qi2fu
    @Riri-qi2fu ปีที่แล้ว +3

    A pat on the back to all MS Excel team! For the past couple of years, you've done amazing job and making my jobs so easy. Continue to do great work! One request - I would be grateful if you could upgrade 'wildcard formula* for searching text🙏

  • @vincentcollin6490
    @vincentcollin6490 ปีที่แล้ว

    Clear, as usual !

  • @user-nm4ul6gr6o
    @user-nm4ul6gr6o ปีที่แล้ว

    Thank you very much my dear teacher for this wonderful video

  • @alparkson5494
    @alparkson5494 ปีที่แล้ว

    This is great Leila, thank you.🤓

  • @Yachid
    @Yachid ปีที่แล้ว

    very sophisticated formula use

  • @noush4283
    @noush4283 ปีที่แล้ว

    Hello Leila thank you I was looking into this formula to separate the numbers an text . It came handy thank you for the information..

  • @vivekphadke16
    @vivekphadke16 ปีที่แล้ว +2

    Excellent, Thanks Leila for updating or shall I say enlightening us ... as always

  • @sowjanyakakani6441
    @sowjanyakakani6441 ปีที่แล้ว

    U r my great teacher 🙏

  • @saktibiswal6445
    @saktibiswal6445 ปีที่แล้ว

    Awesome functions

  • @heimoernstweiss8207
    @heimoernstweiss8207 ปีที่แล้ว

    Great functions and very well presented! Thank you!

  • @MichaelColeman_gig
    @MichaelColeman_gig ปีที่แล้ว

    I watched this a month ago, and thought it was really cool, but wondered if I would ever need it. Today I did need it, and it save me HOURS!!

  • @touchwithbabu
    @touchwithbabu ปีที่แล้ว

    Great stuff 1 as always

  • @fpoester
    @fpoester ปีที่แล้ว +4

    I gotta say "thank you" several times for you Leila, many insights on my job these days comes from your videos and makes me find solutions that are a perfect fit to different situations. Keep on and I'll make sure to press that Like button!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +2

      That’s great to hear! Kudos to you for taking the time to watch and implement.

    • @suela6404
      @suela6404 ปีที่แล้ว

      I have questions, For example, A1 row has name, B1 has dental cost the A2 is blank, B2 Vision amount but A2 is blank. I have 300 employees, Do you have another method not fix row A2
      Thanks Sue

  • @arbazahmad7177
    @arbazahmad7177 ปีที่แล้ว

    Thank you for this new text function tutorial.

  • @Bhavik_Khatri
    @Bhavik_Khatri ปีที่แล้ว

    Very nice tricks.

  • @alannavarrovaldez3117
    @alannavarrovaldez3117 ปีที่แล้ว

    Nice trick!

  • @piytube1
    @piytube1 ปีที่แล้ว

    Great tips

  • @mojtabareyhani7905
    @mojtabareyhani7905 ปีที่แล้ว

    Great as always,
    👍🏿👍🏾👍🏼👍🏻👍👍🏻👍🏼👍🏾👍🏿
    Love from Iran.

  • @AngelStickman
    @AngelStickman ปีที่แล้ว

    Sweet. Never new about these functions. I already have a few files in mind to update. Great showcase.

  • @kickthesky
    @kickthesky ปีที่แล้ว

    Leila, you are my go-to person for anything Excel related. I learn so much watching your videos. This was excellent material! Thanks for sharing your knowledge!

  • @troy5292
    @troy5292 4 หลายเดือนก่อน

    That worked for my needs. Now I just need to use these to convert dates from a format of 2023-12-19 to 12/19/2023 for Excel to enter the date as I need it. Or figure out a custom format to work that out for me. Thanks for setting me on the path Leila! (Again and again)!!!

  • @neampdeak
    @neampdeak ปีที่แล้ว

    Thank you for provide this point i will follow your idea in make video that you explainse very exactly

  • @SyedMuzammilMahasanShahi
    @SyedMuzammilMahasanShahi ปีที่แล้ว

    Thanks for the share.

  • @chh8860
    @chh8860 ปีที่แล้ว +3

    Very cool ... and to think all this time I have been avoiding working with people with long titles in their names ... and now I no longer have to do so ... 🤭
    Once again, I would have no idea these 'tricks' are available if not for Professor Leila ... thank you ... thank you ... thank you ... 😍

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      Haha, I'm still avoiding them 😁

  • @mohammadj.shamim9342
    @mohammadj.shamim9342 ปีที่แล้ว

    Thank you Leila.

  • @AhmedKhaliet
    @AhmedKhaliet ปีที่แล้ว

    Great as usual thank youuuuuu

  • @bluesboynicky6772
    @bluesboynicky6772 ปีที่แล้ว +2

    One thing to add while I was playing around - you can also type in words as your delimiter. I was trying to split a column that had TWO names ex. "John Smith and Jane Doe" into two columns, each with one name. I used " and " as my delimeter and it worked like a charm! Thank you Leila!

  • @aliflettmakhutle5184
    @aliflettmakhutle5184 ปีที่แล้ว

    Lovely, thanks...

  • @arshadkhundmiri1222
    @arshadkhundmiri1222 ปีที่แล้ว

    Really helpful.... thank you 🙂

  • @TroyHowarth
    @TroyHowarth ปีที่แล้ว

    Thanks! I didn't know textbefore textafter was a thing. Going to use this trick when I grt into work today.

  • @yuanchoy2
    @yuanchoy2 ปีที่แล้ว

    Thanks for guide

  • @ricardoluizmarcello
    @ricardoluizmarcello ปีที่แล้ว

    Hi Leila!!! Love your videos!

  • @scheekostudio6574
    @scheekostudio6574 ปีที่แล้ว +1

    Ms. Leila, I am a fan of yours and learning lot of things from your each and every video. Could you please advise whether we can right a formula for cutting optimizer in Excel if possible? Appreciate it very much.

  • @unnikrishnansanthosh
    @unnikrishnansanthosh ปีที่แล้ว

    simple and super, thank you for sharing

  • @GarthShaner
    @GarthShaner ปีที่แล้ว

    Oh the hours of my life in the 1990’s and 2000’s I want back! What a great feature AND a great explanation of how to use it!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      Thank you Garth. Glad you find it useful.

  • @garys2187
    @garys2187 ปีที่แล้ว

    That was very useful. Especially the -1 to search from right to left.

  • @minku1931
    @minku1931 ปีที่แล้ว

    Nice, thanks for all this learning seriously

  • @joshuamanampiu6489
    @joshuamanampiu6489 หลายเดือนก่อน

    Thank you.

  • @sandrap.3399
    @sandrap.3399 ปีที่แล้ว

    Here's a subscriber from Austria - many thanks for this tutorial^^

  • @revingmsto5199
    @revingmsto5199 ปีที่แล้ว

    Dear Mrs, Leila hopes you are doing well, thank you so much for this inquiry
    You are a great consultant and teacher

  • @chrism9037
    @chrism9037 ปีที่แล้ว

    Awesome Leila, thanks!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      My pleasure, Chris! Hope it will come in handy.

  • @AramPirjanian
    @AramPirjanian ปีที่แล้ว

    Thanks!

  • @doma3554
    @doma3554 ปีที่แล้ว

    Very cool TH-cam channel. Excel is so massive, it's hard to find neat tricks unless you're always playing with it and handling weird unique data sets on a daily basis.

  • @abdulrahmanmuslih141
    @abdulrahmanmuslih141 ปีที่แล้ว

    Thanks. It is a great video as usual

  • @handsomecaveman
    @handsomecaveman ปีที่แล้ว +2

    I don't use Excel that much anymore in my daily business routine but, coincidentally, I had a workbook sent to me today and these are the exact functions I used to extract some data from it (+Datevalue). Great job!

  • @kuuuyajim
    @kuuuyajim ปีที่แล้ว +1

    I'm gonna try this today. I was looking for it last month but it's not yet in my Excel so I had to use other functions. 😅 Thank you for this demo. I learned something new again today. ❤️

    • @neampdeak
      @neampdeak ปีที่แล้ว

      i think so your idea

  • @lachinkhammadov9343
    @lachinkhammadov9343 ปีที่แล้ว

    So good function, thanks for Explaining. I found these two formulas a few days ago and using it.

  • @vida1719
    @vida1719 ปีที่แล้ว

    Great features and great example. I liked minus one trick

  • @mariostudio7
    @mariostudio7 ปีที่แล้ว

    Wow how did I miss this one

  • @OneEyedOneHornedGian
    @OneEyedOneHornedGian ปีที่แล้ว

    This is great! I wonder if they will do the same thing for some other formulas.

  • @vickidash-slesinski746
    @vickidash-slesinski746 ปีที่แล้ว +9

    Awesome. I work with a team that implements ERP software and sometimes the address lists for vendors and customers come in together. This should make it easier to separate it out.

  • @helen1599
    @helen1599 ปีที่แล้ว

    What excites me way more than new functions, is your gorgeous hair style 😍🤤 dyson?

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +1

      What?! How did you know? But yeah, gave the Airwrap a chance and even I can use it 😁

    • @helen1599
      @helen1599 ปีที่แล้ว

      @@LeilaGharani I just assumed you would somehow automate this process 😛Cannot imagine you with a hot lockenstab, waiting 1 minute for each single hair 😀
      Anyway, they should pay you now for the live expo. Looks awesome

  • @JulioGarciaLx
    @JulioGarciaLx ปีที่แล้ว

    Great. Because I needed a Split function so much, I had developed mine in VBA. But I never lost time in solving this type of problem, as it is not very common in the data I work with. I had already stopped using my function and now I have two very interesting new ones. Thank you very much.

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      Hope it will come in handy, Julio.

  • @Blackshark553
    @Blackshark553 4 หลายเดือนก่อน +1

    very good

  • @JoseAntonioMorato
    @JoseAntonioMorato ปีที่แล้ว +6

    Dear Leila,
    The TEXTAFTER and TEXTBEFORE functions, unlike the TEXTSPLIT function, work perfectly with selecting an array of text, rather than just a single cell:
    =TEXTBEFORE(A2:A15,". ",-1,,1)
    =TEXTAFTER(A2:A15,". ",-1,,1) 🤗

  • @manzarmanu8985
    @manzarmanu8985 ปีที่แล้ว

    By the way you taught me 90% of what I know in excel as a matter of fact you taught me power query and that we can add an additional calculated field in pivot....thank you for that

  • @ncoz655
    @ncoz655 ปีที่แล้ว

    Simple regular expressions included in Excel. Great to know it has that now.

  • @vijayarjunwadkar
    @vijayarjunwadkar ปีที่แล้ว

    Thanks Leila for this cool and useful trick! As an "insider" you could try it BEFORE, but I will have to wait to try it AFTER, when released in "general"! 😁

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว +1

      Haha, they're already released though. At least to the monthly update channel.

    • @vijayarjunwadkar
      @vijayarjunwadkar ปีที่แล้ว

      @@LeilaGharani Mine is Semi Annual update...

  • @newtonraphsons
    @newtonraphsons ปีที่แล้ว

    Thanks

  • @dominiquehandelsman9333
    @dominiquehandelsman9333 ปีที่แล้ว

    excellent

  • @utarinuravifah9907
    @utarinuravifah9907 ปีที่แล้ว

    Wonderful! Thanks for the video! I love how you could explain the logic behind every formula in the easiest way! If I'm not mistaken, the functions above are one of the features in the Power Query?

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      Glad you enjoyed it! These are regular Excel functions.

  • @mikevitale91860
    @mikevitale91860 ปีที่แล้ว

    That was awesome - thank you for thorough explanation of how these two powerful text manipulation functions can be used to parse strings!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      My pleasure! Glad you liked it.

  • @ghgfly
    @ghgfly ปีที่แล้ว

    Just wanna know how do you keep your hair so pretty & thick after so many amazing videos uploaded . I dropped off a lot of my hair after loved your video. 😉

  • @bunkosquad2000
    @bunkosquad2000 ปีที่แล้ว +4

    Somebody congratulate me - I just passed MO-201 today! I don’t have any friends or relatives who know what that is!

  • @helenb4550
    @helenb4550 ปีที่แล้ว +1

    This is so helpful. I still don't have it on my excel though!

    • @LeilaGharani
      @LeilaGharani  ปีที่แล้ว

      You're probably on a semi-annual update plan. It will be there soon :)

  • @anshu1986
    @anshu1986 ปีที่แล้ว

    Awesome

  • @jeanmorin4580
    @jeanmorin4580 ปีที่แล้ว

    That'll make it easier to extract the last byte of an IP address (example: 10.34.123.4) ! The hoops I had to go through before: =MID(A2,FIND(".",A2,FIND(".",A2,FIND(".",A2)+1)+1)+1,3) simply replaced by =TEXTAFTER(A2,".",-1) A lot cleaner.
    For those interested, I managed to get the other bytes using: =INDEX(TEXTSPLIT(A2,"."),2) to get the second byte (change the 2 to get select any byte, which is even cleaner but unlike Leila's method, doesn't check for errors)
    Thanks Leila!

  • @brunosimon6296
    @brunosimon6296 ปีที่แล้ว

    Thank you! what type of formula to use to get specific words within a cell to be formatted in red? in order to check which cells contains specific words. Thanks

  • @pkrueger9940
    @pkrueger9940 ปีที่แล้ว

    I have always enjoyed all of your videos, and find them VERY VERY helpful.
    I noticed that alot of your names on this video looked as if they were outside of the United States. When people in the US, use their entire name, some or most of them use their middle Initial. Would this work with that involved??

  • @samirawati1975
    @samirawati1975 11 หลายเดือนก่อน

    Hi, what we can do if we want . After that Dr., Please explain, very useful video, thank you so so much

  • @MrSupernova111
    @MrSupernova111 ปีที่แล้ว +2

    Pretty cool! I like the Excel is adding new functions to simplify our jobs but at the same time I feel like my Excel skills become less relevant each time they add new functions. I wonder if VBA users are also impacted by these new functions as Excel makes it easier and easier to perform complex procedures without the need to learn programming. Great video as usual. Thanks!

    • @BenSussmanpro
      @BenSussmanpro ปีที่แล้ว

      @@b0159673 …and for US Federal employees, this is doubly true, lol!

    • @alexdemoura9972
      @alexdemoura9972 ปีที่แล้ว

      not only because Users don't know, many small business have their sheets on Excel 2007 and 2010. In my experience: sometimes keep the 2007 functions only, the first XLSX version and even sometimes don't use 2007 new functions (such as IFERROR, using IF( ISERROR(... ) to achieve compatibility across different Excel versions in a medium-size company. Also, LOOKUP of any kind (V/H/X) is not advised - in older Excel versions the data need to be sorted, it consumes a lot of memory (and speed) sometimes crashing computers with not enough resources depending on the spreadsheet size - I use one-MATCH-many-INDEX successfully for many years.
      I like the EXCEL internationalization - functions translated, values formatting - it is the only "computer language" that can reach all the people around the world with a minimum Math & Logic. But when they think about these new functions... they don't listen the Users, they keep the same old logic such as the ones presented in this video, few Excel functions discriminate the same character (or string) in different positions... and it is become harder and harder for individuals or small/medium business to adapt all their spreadsheet data into this Software as a Service (SaaS) products to people that already paid for their software. Never mind, I'm just letting off
      By the way, the VBA Users can call these new functions as "cell operations" just like any other Excel function if they want to, but VBA itself is not impacted on any way - they said the VBA development reach to an end months (maybe few years) ago - there is no VBA function, command or procedure equivalent to many new Excel functions - if we want to use these new functions in a VBA program we must call them from the spreadsheet which the VBA program is attached to, related to the cells not to the VBA variables.

    • @keosarin00
      @keosarin00 ปีที่แล้ว +1

      @@b0159673 funny how you brought up xlookup. I never used it but earlier today for work I had to learn it and used it. It saved me so a lot of time.

  • @jelajahsebanten
    @jelajahsebanten ปีที่แล้ว

    Great day my sister

  • @markpodesta4605
    @markpodesta4605 ปีที่แล้ว +1

    Thank you Leila. What if you want to include the delimiter for the final title, so it would say 'Dr.' rather than 'Dr'?

    • @sparks1779
      @sparks1779 ปีที่แล้ว

      Wayne edmonson gave us this trick to include the period: =IF(TEXTBEFORE(A2:A15,". ",-1,,1)="",TEXTBEFORE(A2:A15,". ",-1,,1),TEXTBEFORE(A2:A15,". ",-1,,1)&".")

  • @Bob_H
    @Bob_H ปีที่แล้ว

    Dang, they are cutting into my over-complicated, undocumented, flaky macros! LONG LIVE VBA!
    Well done video, very informative

  • @iobtax
    @iobtax ปีที่แล้ว

    Would not flashfill work>> great video

  • @user-ju1it8wf2j
    @user-ju1it8wf2j ปีที่แล้ว

    Very nice trick with -1.
    I want to know why are we getting a random function name (in your case NPER @ around 0:56) in the Name Box? Is it a feature or bug?

  • @bigwigglezgamez798
    @bigwigglezgamez798 ปีที่แล้ว

    Hi Leila. I've watched many of your Excel videos and have learnt enough to run my spice business (including recipes and costing) from Excel.
    I do need help with one concept though: if I update a cost of a raw ingredient and it changes the cost of a final product (eg if the price of Dhania seeds goes up, it will increase the cost of Garam masala), is there a way to hilight any products that would be affected by price change? As in the example, not only would Garam masala price change but several others, is there no method that would be able to help me spot which final products increased in cost?