How to use Left, Right and Mid in Excel VBA

Поделиться
HTML-код
  • Опубликовано: 23 июл 2024
  • 👉 Ready to master VBA?
    - Check out my full courses: courses.excelmacromastery.com/
    - Subscribe to the channel here: bit.ly/36hpTCY
    - FREE CHEAT SHEET: Get the free cheat sheet on VBA arrays here: bit.ly/2MXsnz9
    (Note: If the download page doesn't work then make sure to turn off any popup blockers)
    How to use Left, Right and Mid in Excel VBA
    In this video I cover the Left, Right and Mid functions.
    Important topics covered include
    * When should you use these functions and when should you avoid them
    * How to read each character in a string
    * A little-known feature of the Mid function
    #vbaleft #vbaright #vbamid #vbastring
    Related Links:
    The Ultimate Guide to Excel VBA String Functions(excelmacromastery.com/vba-str...)
    Excel VBA Split Function - A Complete Guide(excelmacromastery.com/vba-split/)
    Useful VBA Shortcut Keys:
    View the Immediate Window: Ctrl + G
    Tab: To move lines of code to the right(Indent).
    Shift + Tab: To move lines of code to the left(Outdent).
    Shift + F2: Get the definition of the item under the cursor.
    Ctrl + Shift + F2: Go to the last cursor position.
    Ctrl + Space: AutoComplete Word.
    Alt + F11: Switch between Excel and the VBA Editor.
    Ctrl + R: View the Project Explorer Window.
    Ctrl + Shift + 8(or Ctrl + *): Get the current region on a worksheet.
    F4: View the Properties Window.
    F5: Run the code from the current sub.
    F9(or click left margin): Add a breakpoint to pause the code.

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

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

    First I thought that there is no sense of watching video covering so simple subject, but once again I've learned that you know so many cool tricks in VBA, that I always learn watching your videos. Thank you so much!

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

    I never knew we could edit the variable with mid, thank you kindly for sharing your knowledge with the world. I wish you the best of health and happiness!

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

    Very clear, helpful and useful. Thanks again.

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

    I learn so much. Thank you very much

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

    High quality context, bravo :) I will definitely go through your videos as I become more advanced vba user.

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

    Very good presentation...I loved it

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

    Very good video as usual.

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

    Thanks Paul. Learned something I didn't know about MID. :)

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

    Best vba lecture ever!

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

    Thanks

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

    Thank you

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

    I am your new subcriber, thanks for sharing, I hope your channel growup, please keep it up to make Tutoria VBA, may GOD bless you

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

    nice sir 👍👍👍👍

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

    Paul, your channel is excellent! I hope you can do some videos using Regular Expressions (Regex) with VBA!!

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

    at 10:41 example was most interesting part of this video

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

    And I doubted that you could teachy me anything about "mid" - how wrong was I. Great tutorial. Thanks for sharing.

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

    I would like to learn more on how to split a csv file using delimeter and search for keyword from multi lines of data and if keyword match extract it out. Do i use split plus array?

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

    Thanks for such informative videos - could you please start a series of Excel VBA with access database if possible?

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

    Thank you so much Paul. I am already working with VBA for years but haven't know yet with MID("ostring",n,n) = "rstring". I want to buy your book but its price is too much here in PH. :-D

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

    Good vid, but I would have used a cell value so I could explain the issues with additional blank spaces and their affect on the result and how to mitigate.

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

      Thanks Rick. That's outside the scope of Left, Right and Mid as you would use Regular Expressions to deal with this issue. I hope to do a video on this in the future.

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

    If in column C have 1000 rows of ID, how the way we make button or initialize to take 5 to 10 character in each rows and copy that into (example) column E ..? If u have that video tutorials, please lemme know the link
    (Sory bad english)

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

    Hi, in 1:24 What do you mean by sandbox? Thank you very much.

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

      It's a place to test code where it won't affect anything else.

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

    Watched it twice to get that tip about using mid to change text, thanks Paul.

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

    Can we delete specific excel file by name in folder? Please suggest the code

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

    Split functions videos are mentioned:
    ruclips.net/video/WKWm_p7AwYg/видео.html
    ruclips.net/video/P26PU4AEKJo/видео.html

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

    Vine buscando música y me encuentro esto xd

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

    Hmmm... this is pretty basic (no pun intended) stuff.

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

      yes it is but some people will find it useful😀

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

      @@Excelmacromastery My reply to you was commentary, not to criticize you. I like the clarity of you videos.

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

    what are, casuals? cmon

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

    Too bad the next video is an annoying music video with no explanation. Unwatcheable...

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

    Thank you