How to Master VBA loops FAST (with real coding examples)

  Рет қаралды 20,498

Excel Macro Mastery

Excel Macro Mastery

8 ай бұрын

Learn how to write real-world Excel VBA code: 👉courses.excelmacromastery.com/
Subscribe to the channel here: bit.ly/36hpTCY
How to Master VBA loops FAST (with real coding examples)
VBA has 4 types of loops and one of these loops can be written in 4 ways. This leads to a lot of confusion. In this video
I am going to show you exactly what each loop is for and when to use it and which loops you can avoid
#ExcelVBALoops #VBADoUntil #VBADoWhile
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + L OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)
Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R
Writing Code:
Search keyword under cursor: Ctrl + F3
Repeat last search: F3
Autocomplete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)

Пікірлер: 22
@Excelmacromastery
@Excelmacromastery Күн бұрын
Learn how to write real-world Excel VBA code: 👉courses.excelmacromastery.com/
@vincentlee7995
@vincentlee7995 8 ай бұрын
Great video. Thank you Paul!
@clintg3435
@clintg3435 8 ай бұрын
I am great at deciphering others code and tweaking to suit my needs, I couldn't write a loop to save my life. Looking forward to this tutorial. Thanks
@vincenttrichy
@vincenttrichy 8 ай бұрын
Excellent and simple way explain. Post more advance vba like Update and changed in google sheet using excel vba.
@vijaysahal4556
@vijaysahal4556 8 ай бұрын
Great sir ❤
@ousmanetall1286
@ousmanetall1286 8 ай бұрын
Thank heaps paul. Can you please put online nested dictionary tuto, i have tried it well based on your videos on dictionary, but want to improve it at the best
@bredmond812
@bredmond812 8 ай бұрын
I learned about the Do Loop because I wanted to exit the loop early under some conditions. It's done with Exit Do. The While loop doesn't have anything like that to break the loop.
@Excelmacromastery
@Excelmacromastery 8 ай бұрын
Yes, the Do loop is more flexible.
@hammeedabdo.82
@hammeedabdo.82 8 ай бұрын
Please, Mr. Paul, we would like you to go into depth on the concepts of object-oriented programming in VBA with applied projects.
@jameswilliams5045
@jameswilliams5045 8 ай бұрын
Nice Opinion :) Personally only ever used For or Do until.
@vijaysahal4556
@vijaysahal4556 8 ай бұрын
Very useful information about looo tq sir 😊
@Excelmacromastery
@Excelmacromastery 8 ай бұрын
You're Welcome
@kukuhwahyurinaldi6288
@kukuhwahyurinaldi6288 8 ай бұрын
Thanks Suhu🙏🙏
@Excelmacromastery
@Excelmacromastery 8 ай бұрын
Glad you like it.
@flameofthephoenix8395
@flameofthephoenix8395 5 ай бұрын
I got tired of loops, so I ended up switching to GoTo statements which are much easier to use and understand without all that finicky syntax.
@EmmaMyler
@EmmaMyler 2 ай бұрын
Hello, so i have a lot of pdf urls to download, probably like 1000. How can i download the bulk all at once? like i wanna put all 1000 url in sheet & click 1 button to download it all, is that possible? since do it manually would take ages. Also the i need to login (username & password) first so i can have access to the pdf urls, can u help? thanks so much!
@Matt-zp9jg
@Matt-zp9jg 8 ай бұрын
Hi very off topic question, do you know how some accounting softwares have vba developed that can create reports and export data to excel. My question is how do they do that? Where do I begin to learn how to do this? Thanks.
@TP-om8of
@TP-om8of 8 ай бұрын
Don’t loop, vectorise!
@Excelmacromastery
@Excelmacromastery 8 ай бұрын
Do you have a VBA example?
@BassamThebian
@BassamThebian 5 ай бұрын
that was great thank you, however am its giving me error 400 once using do while in this code: "Do while sheet2.cells(R,4)"" "". where is the error in this. will very much appreciate your feedback.
@johnwayne8059
@johnwayne8059 8 ай бұрын
Hi Paul, as usual, again a great video from your side!😊 Thanks a lot for your work!🦾😉
@Excelmacromastery
@Excelmacromastery 8 ай бұрын
Many thanks John
I Made this VBA Code 2,880,952% faster
12:21
Excel Macro Mastery
Рет қаралды 24 М.
Use Excel VBA to Read API Data
20:48
Excel Macro Mastery
Рет қаралды 131 М.
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 14 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 20 МЛН
Excel VBA Loop for the Beginners | Excel VBA Tutorials
45:52
Yoda Learning Academy
Рет қаралды 11 М.
Master VBA Debugging in 20 Minutes
22:08
Excel Macro Mastery
Рет қаралды 34 М.
Excel VBA - How to use Excel Table in VBA
15:28
Tech Sessions
Рет қаралды 8 М.
The Ultimate Guide to Copying Data using Excel VBA
31:05
Excel Macro Mastery
Рет қаралды 62 М.
Learn Excel MACROS in 10 Minutes Using Real World Examples
9:13
Kenji Explains
Рет қаралды 1 МЛН
Watch these 28 minutes if you want to become an Advanced VBA user...
29:01
Excel Macro Mastery
Рет қаралды 49 М.
20 Essential VBA Functions Every Programmer Should Know
9:07
SyntaxByte
Рет қаралды 8 М.
How to Declare (Dim) and Set VBA Variables (use data types correctly)
7:32
How to Design and Code an Excel VBA Application Like a Pro
42:27
Excel Macro Mastery
Рет қаралды 210 М.
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 3,3 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 33 МЛН
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 1,2 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН