5 Killer Excel VBA Tips Everyone Should Know

  Рет қаралды 111,470

Excel Macro Mastery

Excel Macro Mastery

Күн бұрын

Пікірлер: 112
@sdawilson
@sdawilson 4 жыл бұрын
It's embarrassing. I've been coding in VBA for 20+ years, mostly in Access. I learn new things every time I watch one of Paul's videos. Thoughtful, structured, articulate and clearly demonstrated... the best on KZbin.
@Excelmacromastery
@Excelmacromastery 4 жыл бұрын
Great to hear! Thanks Simon.
@MGE0007
@MGE0007 3 жыл бұрын
....there is nothing embarrassing about seeking knowledge.....🤔
@kairomalachi255
@kairomalachi255 3 жыл бұрын
You all probably dont care at all but does anybody know of a tool to get back into an instagram account? I was stupid lost my account password. I would love any assistance you can give me
@Vandalfoe
@Vandalfoe 5 жыл бұрын
Great video as always. One thing for viewers of tip #5 to note is that MyMsgBox, as you've posted it, has a hardcoded message. However, it was written to accept any string for message text, by replacing the "... Option B..." hardcoded text with the variable 'prompt', which I see is the first (and only required) parameter to MyMsgBox.
@realhuahin
@realhuahin 5 жыл бұрын
Thank you Paul for the generosity in sharing your experience!
@Ganesh749
@Ganesh749 5 жыл бұрын
Great as always.. Paul Thank you for sharing wonderful tips.. Indeed you are VBA guru!!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks Ganesh
@OmkarUmbre
@OmkarUmbre 4 жыл бұрын
I am working on VBA coding for more than 11 years. But when I watch your videos, I think there are lots of things which still I need to learn and use them. Great videos. Thanks.
@OzScout66
@OzScout66 5 жыл бұрын
Mate, I've learnt more xl vba tips and tricks from you in the past month, than I have in the past 10 years. You are truly a "VBA Master" my friend - Thanks & Cheers from your friends Down Under in Oz :)
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
You're welcome😀
@tuyoexcelypowerbi
@tuyoexcelypowerbi 5 жыл бұрын
Very useful. Best of last VBA tutorials I have watched lately!!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks - Gla d you liked it.
@free3690
@free3690 3 жыл бұрын
Thank you for awesome tips. I am going to try the F3 search!
@mcallister7593
@mcallister7593 3 жыл бұрын
This whole series is just brilliant and I am very grateful I found it. Bravo and thank you.
@sindhusudhakaran1731
@sindhusudhakaran1731 3 жыл бұрын
very useful and not commonly known!! Thank you
@joaocustodio2094
@joaocustodio2094 3 жыл бұрын
Another great video. Thanks Paul.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Thanks Joao.
@jacksonmacd
@jacksonmacd 5 жыл бұрын
I've always been aware of conditional compilation, but never pulled the trigger to try using it. Tip#5 gives me inspiration. Thanks. I really appreciate your clear and concise teaching methods. Btw, perhaps a separate video all about conditional compilation could be interesting.
@edge5817
@edge5817 5 жыл бұрын
Thanks Paul for this wonderful tips... very useful indeed!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Glad you like it Edmundo
@sandeepkothari5000
@sandeepkothari5000 5 жыл бұрын
Paul, these are really killer tips. What a way to usher in the new year! Have a happy one.
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks Sandeep
@justintime5021
@justintime5021 2 жыл бұрын
# 3 was very useful. Thanks for that! I normally always googled that and copied the syntax as well
@Planet_Xplorer
@Planet_Xplorer 3 жыл бұрын
I use 'stop' command for debugging. Very useful
@rajeshkumargoyal6528
@rajeshkumargoyal6528 4 жыл бұрын
Thank you. You are real VBA guru.
@BenjaminHouot
@BenjaminHouot 5 жыл бұрын
Hi, Good tips. thanks for sharing. I use Ctrl+Tab to switch between workbook. You could also use Shift to loop in the reverse order.
@JHatLpool
@JHatLpool 4 жыл бұрын
Really good. Thanks. If only I knew all of this 5 years ago !
@tuworlds
@tuworlds 2 жыл бұрын
another great video thank you
@wayneedmondson1065
@wayneedmondson1065 5 жыл бұрын
Hi Paul.. great tips.. thanks for starting off 2020 with this useful video. Looking forward to more VBA fun with you and Excel Macro Mastery in 2020. Happy New Year.. and Thumbs up!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks Wayne. Glad you liked it.
@iincitr
@iincitr 5 жыл бұрын
Thank you Paul. Tip #5 is very useful that I didn’t know. Would you pls make a video about Excel interoop operations.
@JohnOvens
@JohnOvens 5 жыл бұрын
Hi Paul, this is a fantastic video. You keep adding helpful hints based on your extensive experience. Thanks
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks John. Hope you keeping well.
@scottpinkham330
@scottpinkham330 4 жыл бұрын
Great tips - thank you for this
@juliogadiolisoares3157
@juliogadiolisoares3157 3 жыл бұрын
🤔👏👍 very useful thank you
@szisziszilvi
@szisziszilvi 4 жыл бұрын
Hi, i see there are #s in the code at some points, like somewhere at 9:48 before some commands in this video. What are they? I've never seen them and google won't find it for me.
@Excelmacromastery
@Excelmacromastery 4 жыл бұрын
They are Conditional Compilation Arguments. See my video on Debug.Assert for more information.
@szisziszilvi
@szisziszilvi 4 жыл бұрын
@@Excelmacromastery I'll check for sure!
@MrWarlls
@MrWarlls 5 жыл бұрын
I didn't know the tip 5. I used a global constant to do the same think. But your method is clearly better. Is it possible to set several parameters ?
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
You can have multiple compilation arguments. They are seperated by the colon symbol
@walerij
@walerij 4 жыл бұрын
What does the # sign mean before the IF?
@frikduplessis3869
@frikduplessis3869 5 жыл бұрын
Compliments for the new year Paul, great tips as always
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks Frik
@vbatipsandtricks5237
@vbatipsandtricks5237 4 жыл бұрын
Good way to share.
@BertandRussell
@BertandRussell 5 жыл бұрын
Hi sir, I am the first one to like n comment on this video. God bless you
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks for your support Abid
@mike_case
@mike_case 5 жыл бұрын
Great work again, especially #5 :) Thank you Paul your work is really helpful. I'm waiting for next tips ;)
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks. Glad you like it Michal
@nelsonrioux5555
@nelsonrioux5555 5 жыл бұрын
Thank you for the tips and for letting me discover "Events". By the way I don't know why you have put an "#" before IF and END IF
@aNDy-qh1em
@aNDy-qh1em 5 жыл бұрын
Hello, here is some explanation stackoverflow.com/questions/6325486/if-else-end-if-what-do-the-hash-signs-mean-in-vba C'est facile
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
These #if statements are used by the preprocessor to check if code is to be used or not. Vba checks the code before it runs. If the condition is false then the code is ignored. Even if the code has an error it won't matter because the code is ignored.
@terrylavelle1139
@terrylavelle1139 5 жыл бұрын
@@Excelmacromastery Love your work, Paul. Is it worth expanding on these in a future video?
@songokussj4cz
@songokussj4cz 4 жыл бұрын
For those Conditional Compilation Arguments, I'm doing EarlyBinding/LateBunding checks for the case end user does not have a reference to for example Microsoft.Scripting for Dictionary. Example: Production Arguments: none. Debugging arguments: 'EarlyBinding=1' #If EarlyBinding Then Dim myDict as Scripting.Dictionary Set myDict = New Scripting.Dictionary #Else Dim myDict as Object Set MyDict = CreateObject("Scripting.Dictionary") #End If Now when EarlyBinding=1, I can have myDict. hinting. But when I delete EarlyBinding, it goes to LateBinding which works the same (little bit slower) but User doesn't have to have those references problems
@Excelmacromastery
@Excelmacromastery 4 жыл бұрын
That's a good way to do it.
@obsoquasi
@obsoquasi 5 жыл бұрын
thank you very much for these useful tipps!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
You are welcome John
@aiooshhaw9640
@aiooshhaw9640 4 жыл бұрын
Hi Pual , thanks for your videos its really helpful for us, I wanna to ask you about some problems that i faced when i used VBA, how I can contact with you > thanx
@jmstampe
@jmstampe 5 жыл бұрын
That’s good stuff especially the compiling shortcut; something I find I have to do frequently in my line of work.
@scotolivera8207
@scotolivera8207 5 жыл бұрын
As usual great content and very useful, if there is anyone can explain and give a practical example of how classes work in real life and in which circumstances could be useful that person would be you . So i ll really appreciate if you could take time and make a video about this topic.🙏
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Check this video out: kzbin.info/www/bejne/n5aVdaiZnpKkgbM
@FizzyMcPhysics
@FizzyMcPhysics 4 жыл бұрын
Wow! Some wild stuff buried in the settings. I'll have to remember to press Ctrl F3, instead of Ctrl F Haha. I've recently devised a different way to handle breaking and msgbox suppression using a DebugMode Global variable which I can toggle on and off with a button in the worksheet, or by setting it in the Immediate window. For me, this has the advantage of being built into the code that I import, so I don't have to set up the work workbook the way you did.
@Excelmacromastery
@Excelmacromastery 4 жыл бұрын
Glad you liked it Benjamin.
@warrenhall1750
@warrenhall1750 4 жыл бұрын
That was great.
@RichardCookerly
@RichardCookerly 5 жыл бұрын
Amazing video as always! It’s pretty incredible that I still learn something new with each video even though I’ve been working with VBA for 8 years. Keep up the great work!
@feynmanwasagenius3482
@feynmanwasagenius3482 5 жыл бұрын
Hmm the last one is interesting, what I normally do is import a module called testmsg and call that while I am testing the code. The I remove the module at the end and remove or silence the calls to the module. Interesting different method
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Glad y ou like it.
@scotolivera8207
@scotolivera8207 5 жыл бұрын
Yes indeed
@markwoodward7016
@markwoodward7016 5 жыл бұрын
Hi Paul, I'm really loving your videos. Does the Excel VBA Handbook Course cover everything you present? I would love to have all this information in one place.
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Hi Mark. The purpose of the Excel VBA Handbook course is to teache how to build Excel VBA applications from scratch. So it does include many tips but it doesn't include everything on this channel.
@nicor1501
@nicor1501 5 жыл бұрын
Tip#5 is indeed my favorite too :-)
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thanks Nico
@eltee704
@eltee704 5 жыл бұрын
thanks Paul, do you host your repository anywhere? i'd love to be able to go through the modules for best practices and have some easily set up macros that i may not have thought of
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Hi Lee, I don't host at this time but I do have a 50+ Excel VBA templates. I normally give these away as a special bonus with the Excel VBA Handbook course during live webinars. There will be a live one in the next week or two.
@eltee704
@eltee704 5 жыл бұрын
@@Excelmacromastery thanks for the reply ❤️
@aNDy-qh1em
@aNDy-qh1em 5 жыл бұрын
Hi Paul, i have got a big app >15MB with dozens of modules, forms, class modules. I have applied all the options you proposed to reduce it. Still it is too big. Is there any way to upload modules dynamically? - this definitely should help. Thanks.
@JithinDevan
@JithinDevan 5 жыл бұрын
Thank you Paul for this video... Could you make a video on how to export/save embedded objects from an Excel file? I've tried changing the Excel extension to .zip but it did not work.
@thearchibaldtuttle
@thearchibaldtuttle 5 жыл бұрын
Happy 2020!
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Happy New Year Archibald
@christianmuntean
@christianmuntean 5 жыл бұрын
I need a answer to this. Is it basically possible to somehow connect excel to a gameserver. I mean so the data exchange would be really fast. If this is possible then online Excel games should not be a problem anymore.
@GanovAlex
@GanovAlex 3 жыл бұрын
thanks a lot, your channel is on top of my videos, F3 and goto new Paul's video :-) You're using MZ-tool, that's great one, for me i can't imagine now how to work without it, very comfortable and useful add-on
@lyonhard1
@lyonhard1 5 жыл бұрын
Cool beans Paul
@bogdanexit1
@bogdanexit1 5 жыл бұрын
Hello Paul. You can't make a video in the future to share a opinion for the fastest way tu sumifS not sumif? . I have to sumifs by 5 condition. From sheets that have 200000 - 500000 rows And my last time the code takes 2 hour to run. I search over the internet and the maxim I found is Sumif not sumifS Thanks.
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
I'm sure you meant "Can you make a video?". It's not in my schedule for the near future but who knows:-)
@bogdanexit1
@bogdanexit1 5 жыл бұрын
@@Excelmacromastery You are right (for can't). Thank you :)
@christianhapke9384
@christianhapke9384 5 жыл бұрын
Read the sheet data into an array. Loop threw array and if all x conditions are fulfilled, you add the value you want to sum into a dictionary. This should take a couple of seconds.
@bogdanexit1
@bogdanexit1 5 жыл бұрын
@@christianhapke9384 Thank you.
@slbrick56
@slbrick56 5 жыл бұрын
Just a quick comment ... during the explanation of Tip 4 (turning off error handling) the final display shows that the error stops within a loop that starts with the index value i=2. The error catches when i=3. The narrator indicates that the error occurred on the 3rd iteration thru the loop. But that is not correct. Since the loop began with i=2 and the error occurred when i=3, this is the 2nd iteration of the loop. A very small error in a great instructional video.
@barrygeldham390
@barrygeldham390 4 жыл бұрын
I didn't know about searching with F3 and a quick test shows that I can use it in reverse to search backwards using Shift-F3
@ricos1497
@ricos1497 5 жыл бұрын
The last one I didn't know about. I'm trying desperately to think of a situation where I'd use it. I suppose it could be used when moving a workbook from live to test environment or something?
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
It's more for a development environment. Test should match Live as much as possible.
@ricos1497
@ricos1497 5 жыл бұрын
@@Excelmacromastery sorry, yes, that's what I meant.
@jimfitch
@jimfitch 5 жыл бұрын
Another possible use of Tip 5 could be this: I write procedures & functions with intent to display message boxes in some operational settings, but not others. For example, a procedure executes commands & displays a MsgBox that announces completion to the user. In a different application, that procedure is one of several called by a higher level procedure, so I don’t display the MsgBox at the end of each called procedure (because that interrupts execution until the user dismisses the MsgBox), but I display the MsgBox when the higher level procedure completes. The way I have handled that is to write the lower/called procedure with a parameter that controls display of the completion MsgBox. When executing as standalone, the argument fed to the parameter displays the MsgBox. When called from a higher procedure, the calling procedure supplies the argument that suppresses the MsgBox. It works, but has always felt a bit clunky & requires careful attention to detail. Perhaps Tip 5 would be an easier/better way to control this.
@psychedelarte7257
@psychedelarte7257 5 жыл бұрын
Merci
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Thank you.
@kytan13
@kytan13 5 жыл бұрын
This might be a stupid question, but what´s the shortcut to delete an entire row?
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Ctrl + Y
@kytan13
@kytan13 5 жыл бұрын
@@Excelmacromastery thank you very much.
@shakhobiddinnakiev6767
@shakhobiddinnakiev6767 2 жыл бұрын
#3 is tip?))
@dgh25
@dgh25 5 жыл бұрын
Nice but nothing new. I would like to know how you delete an entire line of code in one click though?
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Ctrl + Y
@dgh25
@dgh25 5 жыл бұрын
Thx! (And OMG! Thats why my code disappears when I use CTRL + Z and CTRL + Y for undo and undo undo - like in Office apps) 👍
@rrrprogram8667
@rrrprogram8667 5 жыл бұрын
If u wanna be 2nd in vba then follow this channel..... (1st is always paul)
@JstnW
@JstnW 5 жыл бұрын
I don't wanna kill anybody, but I'll try your tips.
@Excelmacromastery
@Excelmacromastery 5 жыл бұрын
Please don't (lol). Thanks Justin
@JstnW
@JstnW 5 жыл бұрын
Excel Macro Mastery lol. Ok I was over the top. Sorry
@robertschrock1506
@robertschrock1506 5 жыл бұрын
U
@dmytroYmedia
@dmytroYmedia 5 жыл бұрын
VBA is a zombie language, so let's just don't use it. And help it to die.
@houstonvanhoy7767
@houstonvanhoy7767 3 жыл бұрын
I read this statement yesterday: "If VBA is dead, then it is the most productive corpse in the office."
7 Simple Practices for Writing Super-Readable VBA Code
13:03
Excel Macro Mastery
Рет қаралды 68 М.
5 VBA Hacks Everyone Should Know in 2021
11:20
Excel Macro Mastery
Рет қаралды 92 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Excel VBA: The Magic of the Worksheet Change Event
14:24
Excel Macro Mastery
Рет қаралды 75 М.
Python in Excel vs. VBA - What You Should Learn in 2024!
10:05
David Langer
Рет қаралды 77 М.
Excel VBA: The Little-known secrets of ByVal and ByRef
13:00
Excel Macro Mastery
Рет қаралды 47 М.
5 Things I wish I knew When I started using Excel VBA
12:45
Excel Macro Mastery
Рет қаралды 341 М.
Learn The 5 Best Practices You Should Be Doing In Excel VBA
25:56
Excel For Freelancers
Рет қаралды 7 М.
How to get the Last Row in VBA(The Right Way!)
15:41
Excel Macro Mastery
Рет қаралды 169 М.
10X Your Excel with Macros & Basic VBA
11:18
Kenji Explains
Рет қаралды 97 М.
7 Excel Time Hacks Everyone Should Know | Learn Excel the FAST Way!
22:31
Excel University
Рет қаралды 447 М.
Unlock Excel Secrets: Magic Search Bar You NEVER Knew About!
17:59
PK: An Excel Expert
Рет қаралды 549 М.
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.