How To Master The For/Next Loop | Excel VBA For Beginners

Поділитися
Вставка
  • Опубліковано 6 вер 2024

КОМЕНТАРІ • 54

  • @ExcelForFreelancers
    @ExcelForFreelancers  4 місяці тому

    🔥Download 350 Of The Worlds Best Templates Here ► rebrand.ly/350Wkbks_YTPinnedCom

    • @viniciussardenberg706
      @viniciussardenberg706 3 місяці тому

      boss!, i've been struggling with te syntax of a dynamic step, so say i want the loop to naturally step the row i'm currently on based on a condition, you have any tips on how i'd go about that? thx for the awesome content hope to soon enroll on the the mentorship

  • @tadiwazanza1352
    @tadiwazanza1352 8 місяців тому +5

    Just wanna take this opportunity to extend my gratitude to you, Randy. I knew nothing about Excel and once i found you, i have improved significantly. Keep up the good work! Thank you so much!!!!

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому +1

      Thanks so much. Very kind of you and I am really glad that i can help and share, and thanks for your continued support

    • @khadimhussainmomin1315
      @khadimhussainmomin1315 8 місяців тому +1

      Hi I m Momin from India. Thanks for all your videos. Wish multi user application. But in excel it’s not possible so kindly guide us

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Hi
      @khadimhussainmomin1315 To share and sync your macro-enabled Excel workbook, please watch this training: ua-cam.com/video/f_1HsR9305I/v-deo.html

  • @waleedalisaeed2671
    @waleedalisaeed2671 8 місяців тому +3

    سيد راندي يقال ان الكنوز توجد في الاوحال وانت كنز في اوحال القنوات المنتشرة على اليوتيوب.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Thank you so very much, I really appreciate that Waleed. Very kind of you

  • @carloscrespo-riera9815
    @carloscrespo-riera9815 8 місяців тому +1

    Randy, I just want to thank you for taking the time sharing your knowledge and skills with all of us.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome Carlos, and thanks so much for your comments and continued support. I really appreciate it

  • @j.fabricioelias227
    @j.fabricioelias227 6 місяців тому +1

    Great video. Thank you!

  • @Template-analysis
    @Template-analysis 8 місяців тому +1

    Im Vietnamese , This is great seri for beginner! Big thanks for your effort.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому +2

      Xin Chao. For sure, you are very welcome . Cam on ban (I have lived in Vietnam for 8 years now. Beautiful Country)

  • @johnjacobjinglehimerschmid3555
    @johnjacobjinglehimerschmid3555 8 місяців тому +1

    One of the best things I ever did while programming VBA, and I didn't do it long before getting laid off, was to use AutoHotKey to program to automatically put in the basics of for/next, do, select statements. I could type fornext and pooof it would transform into the perfect for next loop.
    I also did a forrng which would prompt me to activate the worksheet and select the top of the range and it would automatically format a dynamic range for the fornext loop.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому +2

      oh wow that is a great idea. To be honest, I have not even used the AutoHotkey potential. It can do so much more than the way I am using it. It can literally automate almost everything, not just typing. I have to take some time to explore more of its power.
      Thanks again for sharing

    • @nathanielaboagye2259
      @nathanielaboagye2259 8 місяців тому

      @@ExcelForFreelancers so humble Randy. Keep it up

  • @nerenlakhraj5252
    @nerenlakhraj5252 8 місяців тому +1

    Thank you Randy, this refresher course is very enlightening 😊

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome Neren. I am happy that I can bring it to you

  • @user-ez3ei7kf8e
    @user-ez3ei7kf8e 8 місяців тому +1

    Hey Randy... Kindly make some video on accounting software using vba user form

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому +1

      Hi and thanks so much. I will do my best to get that done in the near future. I have a training with accounting and a userform coming up next week with a Tree View control. I hope this helps and thanks so much.

  • @intakhabkhan9649
    @intakhabkhan9649 8 місяців тому +1

    Thank you so much for informative and valuable video, it is very easy to understand by your lecture. Please keep it up continue.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome and thanks so much. I am happy to help and share

  • @jtwtube
    @jtwtube 8 місяців тому +1

    Thank you soo much !!

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome and happy to help and share

  • @nathanielaboagye2259
    @nathanielaboagye2259 8 місяців тому +1

    Indeed grateful, Randy

  • @Michael-Hubbard
    @Michael-Hubbard 8 місяців тому +1

    Thanks Randy, another great teaching. I actually thought the mentorship program was going to be like this and work our way up to making programs with what we learned, I'll work on the mentorship program more once I get better at VBA.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Hi Michael, that sounds like a good plan. The 132 hour mentorship program would probably well over 200 hours if I was going to includes the basic VBA training, so these beginner VBA Basic lessons should help
      You may want to consider enrolling in Daniel Strong’s Ultimate Excel VBA 30-hour course, in which I have secured a special discount for Excel For Freelancer Followers right here: bit.ly/VBACourseRandyShared
      I hope this helps and thanks so much.

  • @SyedMuzammilMahasanShahi
    @SyedMuzammilMahasanShahi 8 місяців тому +1

    Thank you so much Randy for this amazing video.

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome Syed. I am glad you like the training.

  • @laminulams8723
    @laminulams8723 8 місяців тому +1

    Thanks a lot. You have been doing so much for us

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Thank you so very much, I really appreciate that and I am happy to help and share

  • @henkvinck888
    @henkvinck888 8 місяців тому +1

    Thanks again Randy for your great explanation and video

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome Henk. I know these trainings may be a bit basic for you but I really appreciate your continued support

    • @henkvinck888
      @henkvinck888 8 місяців тому +1

      @@ExcelForFreelancers However, there is 1 question I have. How do I keep a good overview of the VBA section when you have created a lot of macros and how do I keep it well organized. And regarding the beginning of these lessons. It is important to experience it from the Master himself and you learn all the time. Thank you

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Hi and thanks I have created a playlist for all the Basic VBA trainings here ua-cam.com/play/PLIBeRriXvKzDTzNp5IME4-oXXCrIjvV4z.html

  • @Sebastien_Frederic
    @Sebastien_Frederic 8 місяців тому +1

    Amazing video as always Sir !

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Thank you so very much, I really appreciate that Sebastien. Thanks for your continued support over the years.

  • @hayden6489
    @hayden6489 8 місяців тому +1

    Awesome stuff, as usual. Thanks so much!

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому +1

      Thank you so very much, I really appreciate that Hayden and glad I can help and share

  • @conan7422
    @conan7422 8 місяців тому +1

    The most important thing has been forgotten:
    At "for", the loop starts with the first value, but it changes with the "next" statement, as long as the value is between min and max, the loop is repeated with the new value.
    It is therefore possible that a loop never ends if, for example, the loop variable is changed within the loop. Also: the value after exiting the loop with "next" will be outside of the last value: with "for a=5 to 7 step 2", for example, will be end with 9 and not with 7 after next!

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Thanks so much for sharing. No doubt. Thank you for your Likes, Shares & Comments. It really helps.

  • @gerardvaneggermond2067
    @gerardvaneggermond2067 2 місяці тому +1

    Hello, I have a problem, I have a sum in C3, now I want to copy it to the next column and then add a cell to the next column up to column DW, what is the best way to do this, can you give an example, thank you

    • @ExcelForFreelancers
      @ExcelForFreelancers  2 місяці тому

      Hi and thanks you can link to the cell using an absolute reference such as =$C$3 then use a relative reference for the remaining cells. I hope this helps. Should you have any additional questions, please join our Excel For Freelancers Facebook Group in which we have thousands of Excel experts who can guide and help you with your Excel Questions. Just post your detailed question, and upload your current workbook, or post detailed screenshots so we can get you the answers you need, fast. Please join here: bit.ly/groupexcel

  • @vinodrajeshkumar6025
    @vinodrajeshkumar6025 8 місяців тому

    Thank you very much 🙏🏽🙂

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      For sure, you are very welcome and I am happy to help and share

  • @kalpanathakur6300
    @kalpanathakur6300 7 місяців тому +1

    Sir in 2nd example why did you take Range as a type of variable and what is works and
    After that why did you write "For Each Cell " what is mean

    • @ExcelForFreelancers
      @ExcelForFreelancers  7 місяців тому

      Hi and thanks the Range will allow us to loop through specific cells within a range and the "For Each Cell" allows the macro to check each cell in the range.
      I hope this helps and thanks so much.

    • @AyushmanThakur-mo3ee
      @AyushmanThakur-mo3ee 7 місяців тому +1

      @@ExcelForFreelancers But in place of "For Each Cell" we can Specify the range also suppose A1:D10 then also it will go to the each cell
      i am getting confusion in this
      Thank you....

    • @ExcelForFreelancers
      @ExcelForFreelancers  7 місяців тому +1

      Hi and thanks for your feedback. I know it can be a bit complex and I will create additional videos in the near future to make that clear. I hope this helps and thanks so much.

    • @kalpanathakur6300
      @kalpanathakur6300 6 місяців тому

      ​@@ExcelForFreelancers Thank you so much sir ☺️

  • @ezellmartin3141
    @ezellmartin3141 8 місяців тому

    Very informative

    • @ExcelForFreelancers
      @ExcelForFreelancers  8 місяців тому

      Thank you for the kind words! I really appreciate your support and I'm glad you found the video helpful.