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

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

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 21 сағат бұрын
Learn how to write real-world Excel VBA code: 👉courses.excelmacromastery.com/
@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
@vincentlee7995
@vincentlee7995 8 ай бұрын
Great video. Thank you Paul!
@vincenttrichy
@vincenttrichy 8 ай бұрын
Excellent and simple way explain. Post more advance vba like Update and changed in google sheet using excel vba.
@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.
@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
@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
Use Excel VBA to Read API Data
20:48
Excel Macro Mastery
Рет қаралды 131 М.
The Ultimate Guide to Copying Data using Excel VBA
31:05
Excel Macro Mastery
Рет қаралды 62 М.
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 75 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 3,3 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 5 МЛН
10 Years of VBA Array Knowledge in 40 Mins
41:57
Excel Macro Mastery
Рет қаралды 9 М.
5 More things I wish I Knew When I Started Using Excel VBA
13:31
Excel Macro Mastery
Рет қаралды 70 М.
Excel Automation Mastery Adding a Calendar to Userform in VBA
8:52
Jacob Mullis
Рет қаралды 3,3 М.
For Each Loop In Java Tutorial #39
9:08
Alex Lee
Рет қаралды 133 М.
Master VBA Debugging in 20 Minutes
22:08
Excel Macro Mastery
Рет қаралды 34 М.
Excel VBA Loop for the Beginners | Excel VBA Tutorials
45:52
Yoda Learning Academy
Рет қаралды 11 М.
Class Modules in VBA: Made Super Simple
17:43
Excel Macro Mastery
Рет қаралды 29 М.
How to Design and Code an Excel VBA Application Like a Pro
42:27
Excel Macro Mastery
Рет қаралды 210 М.
VBA Array with Filter, Sort and Slice (2021)
15:55
Excel Macro Mastery
Рет қаралды 54 М.
How to Use Class Interfaces in Excel VBA
20:16
Excel Macro Mastery
Рет қаралды 78 М.
#miniphone
0:16
Miniphone
Рет қаралды 3,6 МЛН
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,9 МЛН
cute mini iphone
0:34
승비니 Seungbini
Рет қаралды 5 МЛН