Brilliant! I've been (casually) coding VBA in Excel for >20 years and I didn't know some of these! Doh! Please keep doing "Another 5" videos until you run out of ideas. :) Thank you!
@Excelmacromastery5 жыл бұрын
That's really good to hear Chris. I think I'll be able to come up with another few useful tricks.
@ThorstenStrauch5 жыл бұрын
The same is valid for me. Just one word: Whow!
@muhammedwafa96465 жыл бұрын
Please advise, I have a problem with my Excel sheets it has equations and simple codes to navigate between the sheets . But I have to work on 4 or may be 6 sheets at the same time. But Excel tends to crash every time and shows the message"Excel has stopped working " as soon as I got the enable macro button. Thank you
@jacksonmacd5 жыл бұрын
Save here!
@Husky_Passion4 жыл бұрын
for real ? lol, took me 3 months on self learning to know that
@PJTarver2 жыл бұрын
This guy is the best out there by far. For anyone trying to learn VBA for Excel, start here.
@elijahkehayias65318 ай бұрын
I have watched many, MANY! KZbin Videos in order to improve and learn VBA. You are by far the BEST. Explaining the Fundamentals is what teaching is all about, not just "tricks". I am definitely signing Up for your Course. Excel not an easy topic to learn and not every-one has the ability to teach. Thanks for your VIDS. HUGE THUMBS UP.
@gregbernard7861 Жыл бұрын
I have been an intermediate VBE coder for years (do not want to be advanced) - but your channel is great.
@Porconion2 жыл бұрын
Many thanks. Especially the array part. I shed a tear. Happiness? The fact I wasted so much time in the past? It is just the powerfull simplicity at the end.
@Excelmacromastery5 жыл бұрын
Hi everyone, I hope you will enjoy these useful things that I wish I knew when I started using Excel VBA. Please add any comment or queries below the video. Thanks all.
@MohammedImranH5 жыл бұрын
Hi.. Which video editor, screen recorder do you use and audio recorder as well?
@s.m5654 жыл бұрын
Thanks Paul, great stuff.
@houstonsam61635 жыл бұрын
Many thanks for such clear, well-organized, and focused content. I'm the "Excel guy" in my workplace; there are a few KZbin experts I rely on for effective tutoring to increase my knowledge. You're my KZbin subscription for VBA.
@Excelmacromastery5 жыл бұрын
That's great to hear Sam. I'll be adding lots more content.
@adamwstbrook4 жыл бұрын
The array portion was amazing! I didn't know it could use it like that. Definitely a game changer for me.
@missile-shapedbourbon40605 жыл бұрын
Just knowing that people can't break the macro by renaming the sheet is a dream! Thank you so much!
@Excelmacromastery5 жыл бұрын
You're welcome:-)
@warrenhall17503 жыл бұрын
Paul, Taking a step back to see the fundamentals is an interest tour. I wish I had taken that step almost two decades ago. VERY well done. Thanks. Always a pleasure to "see" you.
@Excelmacromastery3 жыл бұрын
Thanks Warren. Glad you like it.
@grtraders5 жыл бұрын
Paul, I rarely comment on any of the youtube videos and just move on most of the time. However, I just wished to make an exception here. I just wish to say that by far you are one of the most brilliant tutors on the internet (that I have come around) in the excel vba arena. Please keep up the good work. It is a pleasure to watch your informative videos. Thanks, Ravi.
@Excelmacromastery5 жыл бұрын
Thanks so much Ravi. That is very high praise indeed.
@redmicrouser79542 жыл бұрын
I love your calm pleasant speaking style. Bonus is succinct, well organized steps of instruction. I give an A+ to this Instructor.
@Excelmacromastery2 жыл бұрын
Thanks😀
@simonbrowning54235 жыл бұрын
At least 15 years of struggling with Arrays, Range limits and parsing text. I wish I’d known these too. You have one new sub. Thank you.
@Excelmacromastery5 жыл бұрын
Great to have you on board Simon.
@JanBolhuis5 жыл бұрын
Great video. Thanks. I'm on a mediocre level but codename was one of the 1st things I have learned from you. Now working on arrays.
@Excelmacromastery5 жыл бұрын
Thanks for the feedback Jan.
@jamesart94 жыл бұрын
Wow, I have been using Excel professionally for 20 plus years and, damn, just learned 5 new things. How I managed without knowing this all these years astounds me. Thank you, thank you, thank you.
@MD.TOUFIKULALAM10 ай бұрын
Assalamualaikum sir i am toufikul alam from dhaka bangladesh. Brilliant idea. i am fan of you vba tutorials. greet thanks
@rods64054 жыл бұрын
Thanks been writing Excel macros and VBA since the 90s did not know the CurrentRegion property. You do have to burn a column to use it, not a big issue as you can just change the background colour of the first row of that border column. Can also get last row or column much nicer than other methods and also grab the data as an array Dim MyRange1 As Range: Set MyRange1 = Sheet6.Range("A1").CurrentRegion ' Get Last row and column Dim LastRow1 As Long: LastRow1 = MyRange1.Rows.count 'Get Array From Range Dim MyRows1 As Variant: MyRows1 = MyRange.Rows ' also works with MyColumns = MyRange.Columns
@michaelreese50855 жыл бұрын
I knew all of them, but the way you use the watch window is something I've never seen and now will use more frequently! Thanks!
@Excelmacromastery5 жыл бұрын
Glad you like it Michael.
@candeffect5 жыл бұрын
'Codename' cleans up the code. Excellent! Subscribed.
@Excelmacromastery5 жыл бұрын
Glad you like it.
@marshallhosel12472 жыл бұрын
Thank you for this straight forward tutorial.
@Paladin1012 жыл бұрын
Literally started vba this month and found this priceless 🙂. As are your others, especially those relating to error handling.
@charlielorenzo36442 жыл бұрын
I still cannot figure it out where to start
@ragnarok7976 Жыл бұрын
@@charlielorenzo3644 Might I suggest playing around with the macro recorder. It will write the shittiest code possible but I found it nice to get a rough idea of what regular tasks in excel look like when you automate them. Plus it can be kinda fun to use too!
@terrycline86895 жыл бұрын
Hi Paul - I am new to this channel and wow, I am BLOWN away! I have written a zillion macros for work, and I completely confess I am amateur in the way I code. I do things very simply, mostly because I need to prove to myself that my loop or function or calculation a) captures and processes the records my logic says it should capture, and b) subsequent manipulation of that data is accurate. So, you can bet my code is bloated and often unnecessary. But it works. Once I am confident everything is working, i would LOVE to speed the code up, minimize where possible, and use all of the built in tools Excel VBA already provides. But I admit that I don't know them very well. Your channel - for me at least - provides the best, simplest, most complete explanations I think I have ever seen. I learned more about how to populate an array in one of your videos then I learned over the past 6+ years of tinkering with this stuff. THANK YOU! I hope you are able to keep it up. You have a fan in California!
@Excelmacromastery5 жыл бұрын
Thanks very much for the feedback Terry. That is high praise indeed. I appreciate it.
@mangobrother4 жыл бұрын
Using VBA for 2 decades. I did not know any these. Thanks a lot mate. More please... Cheers.
@richch8884 жыл бұрын
Paul, I know what you are doing takes a lot of effort to produce. Thanks so much! Your tips are invaluable.
@Excelmacromastery4 жыл бұрын
Glad you like them!
@smithsmith82883 жыл бұрын
1st and 3rd one are easy and brilliant. i never knew that. it would be very helpful. thxs
@Patrick-ge2zn4 жыл бұрын
Many thanks, with arthritic fingers the less typing I do the easier it is for me . This site is a God send .Thanks again.
@sharminfariha49115 жыл бұрын
The use of a variant array for copying range to an array and split function is very helpful. Thank you!!
@Excelmacromastery5 жыл бұрын
You're welcome Sharmin.
@ivanonanga21955 жыл бұрын
Hi EMM, you cannot even imagine what you have done for me and my department... Thank you is not enough!
@Excelmacromastery5 жыл бұрын
Thanks Ivan. You're very welcome.
@blackinktraining98104 жыл бұрын
Great video Paul. I teach a VBA course at a Canadian university and we cover a lot of those techniques. Nice to see someone else setting everyone straight!
@Excelmacromastery4 жыл бұрын
Glad you like them:-)
@julianevans2256 Жыл бұрын
I've been using (and learning) vba for many years and only recently learned about Debug Compile from this video, I used it (along with Option Explicit) on my Personal.xlsb workbook and it took me days to clean up the code! Great tutorials
@harnesshouse3 жыл бұрын
Worksheet code name just solved a problem I was thinking about. Thanks!
@tuworlds Жыл бұрын
i'm late but still wanted to say thank you for these tips. each and everyone of them is pure gem
@simonliang68674 жыл бұрын
The video is very useful for me.I learn a lot tickets,thanks.
@MichaelLass5 жыл бұрын
I have been learning Excel VBA for several months now and what a mess I coded. I learned so much more in 30 minutes of your videos, that I will rewrite my code for a third time to be much cleaner and more efficient. Thanks
@Excelmacromastery5 жыл бұрын
You're welcome Michael.
@ThePablete154 жыл бұрын
Muchas gracias por video! Estoy justo aprendiendo VBA y aprendiendo que los arrays hacen más eficiente mi código.
@prakashsrinivasan78402 жыл бұрын
Omg that codename is very useful thanks. Of course everything in excellent keep on videos like this
@misterhorse8327 Жыл бұрын
Oh wow... Code Names just blew my mind right now.
@ragnarok7976 Жыл бұрын
Very nice. I was literally trying to solve the "user changes sheet name" problem with out locking down the entire workbook and #1 fits the bill perfectly... Not to mention the rest of these tips are great too!
@byronquelal16473 жыл бұрын
your channel is awesome! your code is very clean and elegant!
@Excelmacromastery3 жыл бұрын
Thanks Byron
@davidlee5225 жыл бұрын
Your videos are so awesome, so well organized. Everyone can tell you put a lot of hard effort and making it so easy to follow and learn. You're amazing and raising the bar for everyone!
@Excelmacromastery5 жыл бұрын
Thanks very much David. That is high praise indeed.
@wayneedmondson10655 жыл бұрын
Hi Paul.. thanks so much. These tips are GOLD!! Thanks to videos like this, your excellent web site and blog, and your paid course options, becoming good at VBA is available to anyone willing to put in the time. Thanks for sharing your knowledge and skills.. much appreciated and valued. Thumbs up!!
@Excelmacromastery5 жыл бұрын
You're welcome Wayne. As always, thanks for the great feedback.
@yannhk4 жыл бұрын
Very helpful to improve my coding. This is brilliant.
@Excelmacromastery4 жыл бұрын
Great to hear!
@haiderbokhari15 жыл бұрын
What can I say, your videos are BRILLIANT! Please keep making more! I feel my weekends are so much more productive!!!
@Excelmacromastery5 жыл бұрын
Thanks for your nice comment.
@haiderbokhari15 жыл бұрын
@@Excelmacromastery Thank YOU for sharing your knowledge!!
@mariaalcala51593 жыл бұрын
Great Video! Thanks for sharing your knowledge!
@danwhiffen92355 жыл бұрын
Omg that code name is great. I’ve been modifying my code for years because I link to another excel spreadsheet and the owner of that is always changing the name of the tabs and thus breaking my code. I’ll try it out tomorrow. Thanks
@Excelmacromastery5 жыл бұрын
You're welcome.
@DanBrill4 жыл бұрын
Great stuff. One thing I wish I'd known earlier is that when making an array from a range, it will always be a 1-based array, not 0-based, even if you use Option Base 0 for the module. Thanks, Chris! I've learned a lot from you.
@Excelmacromastery4 жыл бұрын
Who's Chris?😄
@DanBrill4 жыл бұрын
@@Excelmacromastery Ha! Sorry, Paul. You can tell I'm new here.
@SMEEST554 жыл бұрын
Your best video is that about using both arrays and dictionaries
@Excelmacromastery4 жыл бұрын
Thanks Rik
@ziggle3145 жыл бұрын
First-rate exposition. I will use these tips regularly. Thanks.
@Excelmacromastery5 жыл бұрын
You're welcome
@tranyarelisher41855 жыл бұрын
I tend to use the sheet index but I am going to incorporate codename more now. You eliminated everything I hated with the array code... can't believe I have not seen that before...many thanks.
@Excelmacromastery5 жыл бұрын
Glad to help
@iwatchyourvideo4 жыл бұрын
Somehow after upgrading to Office 365, it doesn't like my codes that worked fine for years... everything became so slow. I'm here to learn more skills from you Pau. The array function is REALLY Amazing! Thank you for the tutorial, and thank you for making all your videos!
@Excelmacromastery4 жыл бұрын
You're welcome Tommy.
@ryanmattson15462 жыл бұрын
Great job. Great teacher!
@rrrprogram86675 жыл бұрын
This is the one of important lessons to take from experienced experts
@Excelmacromastery5 жыл бұрын
Thanks glad you like it.
@satyamjha74025 ай бұрын
Simple and brilliant.
@careywong88934 жыл бұрын
Thank you very much. It's really helpful.
@wattjock3 жыл бұрын
Just started teaching myself Excel VBA, for very specific reasons, and very much appreciate your sharing you experience here for novices like me to benefit from! Definitely Subscribing to your channel and will most probably be buying guides from your website in the very near future once I master your basic info!
@Excelmacromastery3 жыл бұрын
Thanks Watt. Glad you liked it.
5 жыл бұрын
Thanks a lot. Your website is one of the best out there for excel vba. I just found that KZbin channel and immediately subscribed to it. Very useful videos.
@Excelmacromastery5 жыл бұрын
Thanks for the feedback. Glad you like it.
@Lutfitince4 жыл бұрын
Very nice videos, and great shortcuts. You not only explain the theory of the functions but also explain solutions to real life situations, and while doing you always have in mind the code speed, as using macros is about speeding processes up in the first place. All is great, but it will be even better if the videos are more organised. Thank you very much for the great content and especially the tips that really matter, game changers when dealing with troublesome scenarios and the pro insights that enable us perspective when approaching problems. Just what people need to get to the next level. Thank you very much again!
@Excelmacromastery4 жыл бұрын
Thanks for the feedback. Glad you like the videos.
@wisecatnoroboris3 жыл бұрын
Thank you so much for this video!
@camambara4 жыл бұрын
Thanks for sharing, I've learnt with you how to copy range to array easily, it helped me out a lot
@viola203534 жыл бұрын
Thank you for these brilliant information. Specially the codename for the sheet and the current region and the other tipps.
@Excelmacromastery4 жыл бұрын
You're very welcome!
@excelmastervba3 жыл бұрын
Hi, yes that would have been really great to know at the beginning already. Thanks a lot for sharing! 🙂
@Excelmacromastery3 жыл бұрын
Glad it was helpful!
@excelmastervba3 жыл бұрын
@@Excelmacromastery it was 👍🏻
@venkyr813 жыл бұрын
Thanks all 5 were new information for me. Thanks for sharing your invaluable knowledge!!
@kevinpaul27428 ай бұрын
all tips are very usefull,thanks!
@skybadou2 жыл бұрын
Nice, I knew 2 out of 3! Good video thx
@PHILIPROYBENEDICTLOUIS3 жыл бұрын
Thank you so much, this is life saver.
@Anukiranvlogs3 жыл бұрын
Awesome, great ideas. Thank you very much ☺
@MichaelMadiganDublin5 жыл бұрын
Thanks for the videos - super helpful and very well presented.
@Excelmacromastery5 жыл бұрын
Thanks for the feedback Michael.
@srinivasraogampala44204 жыл бұрын
He is really a genius... His codes are short and fast!!
@MrRandsauce5 жыл бұрын
Like the range to array. Thanks a handy one.
@Excelmacromastery5 жыл бұрын
Thanks Mark.
@fordfactor4 жыл бұрын
Tip 1 I found a few years ago: makes things sooo much easier. I would add a related tip and that is to use Defined Names for cells: if you need to move the cells referred to in your code around on your sheet, the defined name goes with them and you don't have to change your code. Although you probably knew that already! :)
@mrashid2293 жыл бұрын
All your video lessons not only are lifesavers but inspiring too. Among many unknows simply not knowing 𝐂𝐮𝐫𝐫𝐞𝐧𝐭𝐑𝐞𝐠𝐢𝐨𝐧 made my life unnecessarily difficult. Utilizing that along 𝐎𝐟𝐟𝐬𝐞𝐭 and 𝐑𝐞𝐬𝐢𝐳𝐞 wrote the function below in case someone wants to eliminate 1 or more rows at top/bottom or 1 or more columns at left/right. Any suggestion from you on this will be helpful for me/us, I guess. Private Sub TryGetRegion() Dim rg As Range ' Row 1 has the header and the bottom row is for calculations, data starts from A2 Set rg = GetRegion(shProducts, "A2", 1, 1) End Sub ' -- Returns a range based on current region of a requested cell and ' -- optionally clipping some surrounding rows/columns Public Function GetRegion(sh As Worksheet, PointerCell As String, _ Optional SkipTopRows As Long = 0, _ Optional SkipBotRows As Long = 0, _ Optional SkipLftCols As Long = 0, _ Optional SkipRgtCols As Long = 0) As Range Dim rg As Range: Set rg = sh.Range(PointerCell).CurrentRegion If SkipTopRows 0 Then Set rg = rg.Offset(SkipTopRows).Resize(rg.Rows.Count - SkipTopRows) If SkipBotRows 0 Then Set rg = rg.Resize(rg.Rows.Count - SkipBotRows) If SkipLftCols 0 Then Set rg = rg.Offset(ColumnOffset:=SkipLftCols).Resize(ColumnSize:=rg.Columns.Count - SkipLftCols) If SkipRgtCols 0 Then Set rg = rg.Resize(ColumnSize:=rg.Columns.Count - SkipRgtCols) Set GetRegion = rg End Function
@songokussj4cz3 жыл бұрын
After 5 years of coding with VBA and hating when something happens in my form's object custom class but debug line highlights only "form.show"... I discovered: Tools -> Options -> General -> Error Trapping -> Break in Class Module. Up until now I always had "on all errors" or "On Unhandled Errors". My god what a discovery...
@Excelmacromastery3 жыл бұрын
Such a simple thing but it makes a big difference.
@mkparker992 жыл бұрын
Brilliant advice!
@felipelandim28814 жыл бұрын
Just awesome. Thank you.
@ronkanij70205 жыл бұрын
In stead of typing the full address of the destination cells you could use the size of the current region to determine the size. It is more flexible and you don't need to think column H +4 is column K. For example: Sub Arr() Dim rCR As Range Set rCR = Range("A1").CurrentRegion Range("H1").Resize(rCR.Rows.Count, rCR.Columns.Count).Value = rCR.Value End Sub If for example the number of rows increases you do not need to alter the above code.
@Excelmacromastery5 жыл бұрын
Thanks Ron. I was just using the full address for the example. Obviously in a real-world example it wouldn't be hard coded.
@noviceprogrammer20114 жыл бұрын
I noticed you wrote: Dim arr As Variant Normally I would write Dim arr() As Variant The reason for the inclusion of the brackets is that it reminds me it is an array. However I would like to draw to the attention of the readers there is one very serious drawback to adding the brackets. If your data only has a single value, it will crash!
@JANtheDane5 жыл бұрын
Awesome advice! I was blown away by the simple Array code.
@Excelmacromastery5 жыл бұрын
Thanks Jan. Most people are amazed when the see it first - myself included.
@eltonm.t.8733 жыл бұрын
Very useful tips!
@eisayev3 жыл бұрын
The first one was goooood 👍
@jgenterprisesnew95525 жыл бұрын
GREAT x 3 !!! I really enjoined this video, specially the SPLIT trick. Back in the 80's I worked writing code for a company that did a lot of mailing. We would get a "dirty" list of names, and had to "clean it up" before we could use it for mailmerge with WORD. I don't know if SPLIT existed then but if it did I wish I've know about it.
@Excelmacromastery4 жыл бұрын
Thanks. Yes, split is a great function - My next video will show examples of using split.
@houstonvanhoy77673 жыл бұрын
I suspect that VBA has a lot of built-in functions (like SPLIT, for example) that few VBA coders know about. If more people used VBA, perhaps that kind of knowledge would be more widespread than it is. But leave it to Sir Paul to dig it out, use it and explain it to us. Many thanks to the master!
@JohnOvens5 жыл бұрын
Hi Paul, I agree - I wish that I knew them before starting out with VBA. Finding LastRow was generally trial and error.
@Excelmacromastery5 жыл бұрын
Thanks for the feedback John.
@db7erry3 жыл бұрын
For Point #2, you say that the keyboard shortcut from Excel to select the current region is: Ctrl+Shift+8. This is not true; in fact, it is just a coincidence of your keyboard layout that allows this to work. The actual keyboard shortcut for the current region in Excel is: Ctrl+* Try Ctrl+* using the number keypad. That being said, I more often use Ctrl+A. The first use of Ctrl+A when a range is selected will result in the selection of the current region; if you use Ctrl+A an additional time after the current region is selected, it will select the entire worksheet. But the first use will select the current region while multiple uses of Ctrl+* will keep the focus on the current region.
@martynasr88145 жыл бұрын
Very informative. The only thing that makes me sad is that you've started doing these videos much later than I started learning VBA. Would have saved me tons of time. Keep up the good work!
@Excelmacromastery5 жыл бұрын
Thanks Martynas. Glad you like them.
@adamploof35285 жыл бұрын
Really glad to see some new VBA videos with such great instruction. I use VBA almost daily and find these tips really useful. Only feedback I have at the moment is that I wouldn't mind if the sounds of the mouse clicks were a lot quieter -- it's a little distracting. Please keep these coming!
@Excelmacromastery5 жыл бұрын
Thanks Adam.
@ClaudioBOsorio3 жыл бұрын
Wow this is great Thanks for teaching those cool tricks!
@Excelmacromastery3 жыл бұрын
No problem!
@lbarrera21975 жыл бұрын
Thanks! very good tutorial. Short, clear and concise.
@Excelmacromastery5 жыл бұрын
glad you like it.
@marcusnelson35205 жыл бұрын
Hi, you are a legend. Thank you so much!
@Excelmacromastery5 жыл бұрын
Thanks for your comment Marcus.
@afilipppp5 жыл бұрын
so much time lost finding ranges... glad i clicked this suggested video. ty man
@biodreg13325 жыл бұрын
I wish I had known the first hint! As for the code in 4:39 vs 5:29 it is worth pointing out that the code in the second solution runs much faster than in the first one. The speed difference is noticeable in big projects (large arrays and ranges).
@eicosano5 жыл бұрын
I've been coding and this was very helpful in glad I stomped on your video thank you very much
@Excelmacromastery5 жыл бұрын
You're welcome.
@sandeepkothari50005 жыл бұрын
Paul, I too wish I knew these beforehand.
@Excelmacromastery5 жыл бұрын
Thanks Sandeep. Glad you like them.
@tomc.39875 жыл бұрын
This is great. Thanks. I come from an Access background and am moving over to Excel. Current region is great for use with arrays. I use Ctrl + A to select it in my version of Excel.
@Excelmacromastery5 жыл бұрын
Thanks Tom. Keep in mind that Ctrl + A(select all) is different than Ctrl + * (i.e. select current region)
@niavras3 жыл бұрын
Great stuff! Thank you!
@Excelmacromastery3 жыл бұрын
Glad it helped!
@Dyxacm5 жыл бұрын
Maybe every one knows, but if you want to call an array or single cell with the text address, you can use square brackets instead of "range". For example, you can call A1:D10 range with [A1:D10] instead of Range("A1:D10").
@Excelmacromastery5 жыл бұрын
As far as I know the square brackets use the evaluate function so they can be a bit slower than using the range the normal way.
@vivekphadke165 жыл бұрын
That is very insightful and of a great help for a 'VBA novice' like me. Thanks a lot.
@Excelmacromastery5 жыл бұрын
Thanks Vivek. Glad you like it.
@tgirard1235 жыл бұрын
Holy crap, just what I needed. Subscribed. I've learned something new in every video.
@Excelmacromastery5 жыл бұрын
Thanks Timmy. Glad you like it.
@versusstats70514 жыл бұрын
Very useful. Thanks.
@Agapeisthebest3 жыл бұрын
Thanks for sharing.
@ngassthy4 жыл бұрын
Thank you for the video. Really helpful. I believe we could get the current.region by clicking in a cell and CTRL+a
@Excelmacromastery4 жыл бұрын
Ctrl+A is works differently that current region. It means "select all" in most applications.