Is PYTHON or VBA better? Which language should you learn? 🤔

👉 Explore All My Excel Solutions: pythonandvba.com/solutions
𝗗𝗘𝗦𝗖𝗥𝗜𝗣𝗧𝗜𝗢𝗡
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Is Python or VBA better? In this video, I'm going to show you the pros and cons of both languages. I'll also show you why Python is more popular these days and how it differs from VBA. After watching this video, you'll be able to choose the right language for you!
🌍 𝗟𝗜𝗡𝗞𝗦:
▶ Presentation incl. example code (Python/VBA): pythonandvba.com/python-vs-vba
▶ ‘xlwings’ Add-in: docs.xlwings.org/en/stable/ad...
▶ ‘MyToolBelt’ Add-in: pythonandvba.com/mytoolbelt
▶ Rubberduck: rubberduckvba.com/
▶ MZ-Tools: www.mztools.com/
⭐ 𝗧𝗜𝗠𝗘𝗦𝗧𝗔𝗠𝗣𝗦:
00:00 - Introduction
00:25 - Opinion Disclaimer
00:38 - Purposes of Python and VBA
01:27 - Other Tools for MS Excel
02:08 - Python and VBA Example
04:20 - Pros and Cons of VBA
06:56 - Pros and Cons of Python
09:20 - Conclusion
10:24 - Tips to combine Python and Excel
𝗧𝗢𝗢𝗟𝗦 𝗔𝗡𝗗 𝗥𝗘𝗦𝗢𝗨𝗥𝗖𝗘𝗦
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🆓【𝗙𝗥𝗘𝗘】Excel Add-in (𝗠𝘆𝗧𝗼𝗼𝗹𝗕𝗲𝗹𝘁): pythonandvba.com/mytoolbelt
📊 Data Visualization Excel Add-In (𝗚𝗿𝗮𝗳𝗹𝘆): pythonandvba.com/grafly
🤪 Fun Emoji Excel Add-In (𝗘𝗺𝗼𝗷𝗶𝗳𝘆): pythonandvba.com/emojify
📑 Excel Templates: pythonandvba.com/go/excel-tem...
🎓 My Courses: pythonandvba.com/go/courses
📚 Books, Tools, and More: pythonandvba.com/resources
𝗖𝗢𝗡𝗡𝗘𝗖𝗧 𝗪𝗜𝗧𝗛 𝗠𝗘
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🔗 LinkedIn: / sven-bosau
📸 Instagram: / codingisfun_official
💻 GitHub: github.com/Sven-Bo
💬 Discord: pythonandvba.com/discord
📬 Contact: pythonandvba.com/contact
☕ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲?
If you want to support this channel, you can buy me a coffee here: pythonandvba.com/coffee-donation

Пікірлер: 107

  • @training7574
    @training7574 Жыл бұрын

    Very helpful. Especially seeing the two codes side by side gives the beginner a sense of the learning threshholds. Thanks!

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    I'm glad you liked my video and I appreciate your feedback. Thank you for taking the time to leave a comment! :) 👍

  • @shinrafahell
    @shinrafahell2 жыл бұрын

    I totally agree with your ideas in this video. It definitely makes sense to use the right tool for the right job. Thank you, and keeping going with these amazing videos.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Hi Rafael Santos. Thank you for watching the video and taking the time to leave a comment! :)

  • @cuejorge2003
    @cuejorge20032 жыл бұрын

    Thank you so much for sharing this information!!. I just started learning Python two weeks ago and I have been using VBA for more than 20 years, so it is very important forr me to hear your opinion and as you said: I will try to use the right tool to have the job done.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Hi Jorge Cue! Thanks for watching the video and taking the time to leave a comment. Glad to hear that you liked the video. Happy Python learning & coding! :)

  • @ermalgashimramori
    @ermalgashimramori2 жыл бұрын

    Very well prepared opinion, I love the metaphores used to illustrate.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thank you, Ermal Gashi! 😃

  • @florianroeseler2404
    @florianroeseler24042 жыл бұрын

    I learned so much from this video! Thank you!

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thank you, Florian, for watching the video. Glad it was helpful!

  • @kuuuyajim
    @kuuuyajim2 жыл бұрын

    I know a bit of VBA because I did some simple automations and a bit of code debugging on Excel. Now that I'm starting to learn Python, and with the basics that I've learned so far, I think VBA is easier to do without really learning how to code. Python on the other hand can be confusing but once you get to understand how functions work, I think it's actually fun. And with what you discussed, I think I'm on the right path because I'm pursuing a career in data analysis.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Hi, Jimcarl S. Thanks for watching the video and sharing your opinion on this topic. Good luck on your Python learning path! 💪🚀

  • @kamalelbo5116
    @kamalelbo51162 жыл бұрын

    Thanks a lot for this video, it’s very clear and efficient.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    A pleasure! Thanks for watching the video and your comment! :)

  • @christianrauth1425
    @christianrauth14252 жыл бұрын

    As always great job, La Máquina! Would be great to have the canteen menu as .exe 😉 Already looking forward to our TM1 videos 👍🏽

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Muchas gracias, la máquina! 🦾

  • @venugopals9680
    @venugopals968010 ай бұрын

    Thana you very much for this in detail briefing. Love your videos.

  • @CodingIsFun

    @CodingIsFun

    10 ай бұрын

    Thanks for watching. Glad you like my videos. :)

  • @louism.4980
    @louism.49805 ай бұрын

    Thank you so much, you are succinct and very informative :)

  • @CodingIsFun

    @CodingIsFun

    5 ай бұрын

    Glad I could help! Thanks for watching and for the kind words.

  • @sergiobarros5541
    @sergiobarros5541 Жыл бұрын

    Awesome explanation!

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Glad you liked it. Thanks for watching.

  • @pythoninoffice6568
    @pythoninoffice65682 жыл бұрын

    Nice job Sven! That's also how I feel - choose the right tool for the job! That said, I find myself using Python more and more even for small and quick automation things like renaming or moving files. I also agree that some companies tend to block Python or .exe files. My solution to that was to build some must-have tools for my team, then give everyone training on Python. Now everyone is getting benefit from Python and they can't do some jobs without it 😂

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thank you, Jay! Fantastic to hear that your teammates are also using Python now. BTW, keep up the great content on your channel! 💪 Love your videos 👍

  • @pythoninoffice6568

    @pythoninoffice6568

    2 жыл бұрын

    @@CodingIsFun thanks Sven!🙏

  • @yasheshbhansali2643
    @yasheshbhansali2643Күн бұрын

    Hands down the best video I have seen on this topic. Thank you ! I got my answer

  • @CodingIsFun

    @CodingIsFun

    Күн бұрын

    Glad I could help! Thanks for watching and for the kind words. Cheers, Sven ✌️

  • @officetricks6303
    @officetricks63032 жыл бұрын

    Clear explanation.. Thanks a lot.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thank you! 👍

  • @Akens888
    @Akens8889 ай бұрын

    Another advantage of VBA is that it is almost 100% compatible with VB6, so if you want to compile something to an executable that can run outside of an office application it is fairly trivial. And there are new IDE/compilers like TwinBasic that are dragging the language kicking and screaming into the modern world.

  • @CodingIsFun

    @CodingIsFun

    9 ай бұрын

    Very good point! 👍

  • @alexp.2647
    @alexp.264725 күн бұрын

    I appreciate the video and the channel. An advantage I would note for VBA is that it already comes with MSFT apps, no additional setup or IT requests needed. Also, I think whnen folks are looking to learn one or the other, they'd be best suited listing all the tasks they want to do, first. Then go from there. I think many people would probably be best served by VBA and would save frustration starting with that, then moving to Python. Again, not to say one is better than the other, but I would bet for most people VBA would suit their needs just fine and Python is overkill.

  • @CodingIsFun

    @CodingIsFun

    20 күн бұрын

    Thanks for watching the video and sharing your thoughts! Cheers, Sven ✌️

  • @diegomartin5250
    @diegomartin52502 жыл бұрын

    Excelente!!

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Muchas gracias! 👍

  • @Sancarn
    @Sancarn2 жыл бұрын

    In fairness I think it's a little unfair using any libraries in the python example. In the end though, in this specific example, I don't think it matters and I think that really goes to show how much effort you've put into providing a balanced argument! Well done :) Regarding the advantages of VBA there are a few that you missed which I think are pretty big: * Ability to make macro addins to enhance whole user experience across all workbooks. - This is only paralleled by VSTO addins. * Ability to interact with Application events system - I think this is critical as you can do many simple things with events which is beyond most people's wildest dreams Regarding the disadvantages of VBA: * Restricted to Office Applications is actually not true anymore. TwinBasic is an implementation of VB7 (VBA) which works outside of Office, is fully compatible with Office, but compiles to EXE files. It also has additional features which are missing from traditional VBA/VB6. So the only thing lacking from this video really, in my view, is VSTO/XLDNA and OfficeScript

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Those are all excellent points! 👍 Thanks for watching the video and sharing your opinion.

  • @JDWilliamsPD
    @JDWilliamsPD Жыл бұрын

    Bravo!

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Glad to hear you liked it! Thank you for commenting and watching. 👍

  • @-J.R-
    @-J.R-Ай бұрын

    Hi, This is a very good review and advice. I have been writing my own code since 1980 using many languages, Assembley, Fortran, VB, C+, VBA, and many others in between. Yes, I agree with your final conclusion, but I want to add this. For many years now I have used Excel and VBA to develop very powerful engineering programs for research. What I am saying is that VBA should not be underestimated. It is just outdated, I guess. After all, it is you, the programmer, that matters much more than the language you use.

  • @CodingIsFun

    @CodingIsFun

    Ай бұрын

    Thank you for watching and for your comment. I completely agree with you! Cheers, Sven ✌️

  • @confidential303
    @confidential303 Жыл бұрын

    This was a nice and clear presentation, though the reason why I really liked VBA is the debugging code Is awesome! I really miss that in python ...and also that stupid intend you use in loops can be really annoying ..in c# , Java and other languages I find that better. Python though can be very cool if you know how to program it ..and I agree the one is not superior over the other they are just there to make your life easier. Though one major point I would at is the execution speed. I think python might be way faster then vba

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for watching the video and sharing your thoughts!

  • @brandonemersonmarquezcatal1996
    @brandonemersonmarquezcatal1996 Жыл бұрын

    Good work. I worked a little project with VBA, but now I´ll use python instead

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thank you! Happy coding in Python! :)

  • @peterwooldridge7285
    @peterwooldridge7285 Жыл бұрын

    At the end of the day it depends what you're seeking to achieve . Vba within an office environment is fine particularly if you're willing to use Windows API's. I'd suggest learning C in the first instance

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for you taking the time to watch the video and leaving your thoughts, means a lot. 👍

  • @devlife5596
    @devlife55968 ай бұрын

    Ohh man, I do need to login for commenting. You got my subscribed + All Bell + my huge Respect. I do agree with all what you said in this video. And, I think: Do not ask what programing language we should learn. But ask, Why do I have to learn that programing language. Python is so so good. But that's not easy for you if you want to create your own commercial application. You need to learn a ton of knowledge for your goal. But, with VBA you can. also commercial application. Just thing carefully, What you want to be. What will you do. Then start. If not, you'll spend a lot of time for learning but can not achieve your goal. God Bless. Have a good day.

  • @CodingIsFun

    @CodingIsFun

    8 ай бұрын

    Thanks for taking the time to watching the video and commenting. I absolutely agree - each programming language indeed has its purpose and strengths. Happy Coding! 👍🍀

  • @rachellau4471
    @rachellau4471 Жыл бұрын

    Thanks

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thank you so much for your support! I appreciate it! 🙏

  • @hadibq
    @hadibqАй бұрын

    knowing that still for the time being, VBS scripting can extend the use to more windows uses. I have plenty of little life-comfort tools in vbs scripts that I run from shortcuts or scheduled. it's worth the time spent learning VB/VBA language when you're a windows user. Python is cool if you need to accomplish more complexe projects with less coding efforts. still needs a good brain for good solutions :)

  • @CodingIsFun

    @CodingIsFun

    Ай бұрын

    Thanks for watching and sharing your thoughts! Cheers, Sven ✌️

  • @ragnarok7976
    @ragnarok79764 ай бұрын

    I use the COM object to convert lots of xls files to xlsx. Python is much easier to walk the file system with but Excel seems to produce the best results when it comes to file conversion.

  • @CodingIsFun

    @CodingIsFun

    3 ай бұрын

    Thanks for watching. Totally agree on that one. Python makes navigating the file system much easier compared to VBA. Cheers, Sven ✌️

  • @bc4198
    @bc41982 жыл бұрын

    VBA with Excel feels super messy to me, dealing with cell references and all that, but more than anything I just can't stand having to save it with macros! I like that python doesn't ask, "Are you sure you wouldn't rather save this in a way that doesn't work?" Also, it drives me bonkers to keep switching from macro view to regular, and back. Finally, half the time I need to have it interact with legacy software, so Python is the only choice anyway - glad it's the one I prefer! Only downside, like you said, is getting permission for new software, even free.

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thanks for watching the video & sharing your opinion!

  • @BalrogsHaveWings

    @BalrogsHaveWings

    Жыл бұрын

    I understand you completely... Coming from the other side: If Brain works in cells and grids, Excel and VBA literally walks you through it, else end if 😅 Python dont even need to state the Object, just put it where you wanna run it.

  • @abdullah_alhathloul_
    @abdullah_alhathloul_2 жыл бұрын

    thanks

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thanks for watching!

  • @casual_gamer1413
    @casual_gamer14132 жыл бұрын

    I'm a python web scraper and I have good grip on python, so, Should I go for VBA or continue with the python to handle excel problems?

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    In that case, you might want to tackle your Excel problems/automation with Python

  • @CurtCubic
    @CurtCubicАй бұрын

    Great video, but to my opinion you are missing an Excel VBA pro: The UI. It is MUCH easier to make a proper GUI

  • @CodingIsFun

    @CodingIsFun

    Ай бұрын

    Great point! Cheers, Sven ✌️

  • @FreedomTalkMedia
    @FreedomTalkMedia Жыл бұрын

    If Microsoft doesn't plan to continue updating VBA, does that mean they might be phasing it out? That their applications will switch to Python as the primary coding method? That macros will start to record in Python? That people won't need a plug-in to code python in Office, in the future?

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for watching the video. Only Microsoft knows the answers to your questions ;)

  • @Ketoswammy
    @Ketoswammy Жыл бұрын

    Anytime you can avoid a MSFT product you are likely better off.

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thank you for watching the video and taking the time to leave a comment!

  • @gwenaelriou3559
    @gwenaelriou355911 ай бұрын

    and Office Scripts ? What do you think of it ?

  • @CodingIsFun

    @CodingIsFun

    11 ай бұрын

    Thanks for watching. I have not used Office Scripts yet, but in general Office Scripts and VBA both serve automation purposes in the Microsoft Office Suite. Office Scripts, the newer platform, utilizes JavaScript and operates in the cloud, specifically for Excel on the web. On the other hand, VBA, a long-standing tool, operates on the desktop, spans the entire Office Suite, and relies on Visual Basic for coding. So, if you need to automate Excel in the Web, Office Scripts might be way to go.

  • @kamani4168
    @kamani4168 Жыл бұрын

    Which will be given high package and VBA or phyton and which one is highly demand in MNC companies.

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    The package and demand for VBA and Python can vary depending on many factors such as the specific company, the specific role, and the candidate's experience and qualifications.

  • @beenay18
    @beenay18 Жыл бұрын

    why isn't there any practical books on vba?

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for watching. Not sure what exactly you are looking for, but here are my favorite resources for learning VBA: pythonandvba.com/resources/#VBA I hope it helps!

  • @sakthii2403
    @sakthii240311 ай бұрын

    I have experience in Advance Excel, i handle VBA which already created if is there any error occurs while running means my team mate (now he left from my company) guided me, so i can debug vba. In my project my company using Excel only. Right now no one know VBA in my team, mostly all our teammates are doing repetitive tasks every day. Now i m planning to learn VBA or Python i m not that much good in coding (i Know basic SQL, PLSQL) could you please any one suggest me which one i need to learn right now.(if i learn VBA is that good future? or directly can i learn python?) I m in confusing stage please help me.

  • @CodingIsFun

    @CodingIsFun

    11 ай бұрын

    In my humble opinion, before diving into programming, it could be beneficial to examine why there are so many repetitive tasks in your workflow. It's often possible to optimize these processes with minimal coding. You might want to consider utilizing no-code or low-code tools, such as Microsoft Power Query or Power Automate. These tools are designed to streamline processes and tasks without requiring significant programming knowledge. However, if there's a need for a custom solution that these tools can't provide, then exploring VBA or Python becomes relevant. The choice between the two would be largely influenced by your specific use case, as I have explained in my video. Both VBA and Python have their strengths, and the right choice depends on what you need to achieve. If the tasks are specific to Excel, VBA could be the way to go. However, if the tasks are more diverse and complex, Python's versatility might be more suitable. Remember, there's no one-size-fits-all solution. Consider your immediate needs and long-term goals, and choose the path that aligns with them. Good luck!

  • @sakthii2403

    @sakthii2403

    11 ай бұрын

    @@CodingIsFun Thanks for brief explanation sir, our repetitive tasks are data extraction, Data cleansing, after cleaning need to filling gap using lookup formulas , after filling gap need to organizing data, Data Transferring to msword template and also consolidation.. could help me for making right decision?

  • @NIRAJKUMAR-fm6vp
    @NIRAJKUMAR-fm6vp2 ай бұрын

    How can i copy sheet2 data and create and notepad.text file. excluding indexing and heading. how can i do that. can u provide me code how can i do that task.

  • @CodingIsFun

    @CodingIsFun

    2 ай бұрын

    Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @NIRAJKUMAR-fm6vp

    @NIRAJKUMAR-fm6vp

    2 ай бұрын

    @@CodingIsFun thanks for your responses. i am able to get code now.

  • @NIRAJKUMAR-fm6vp

    @NIRAJKUMAR-fm6vp

    2 ай бұрын

    i used 'for loop 'from first row to till last row and column and store in variable. then i write that variable into notepad file

  • @PapiJack
    @PapiJack5 ай бұрын

    This video could be 3 seconds long. Learn Python.

  • @-J.R-

    @-J.R-

    Ай бұрын

    Why if interested in Excel only?

  • @darrenlefcoe
    @darrenlefcoe8 ай бұрын

    I suppose that it should be added that python is free open source software whereas excel is not. This is a material cost.

  • @cbbcbb6803
    @cbbcbb6803 Жыл бұрын

    What if Microsoft were to open-source VBA. What can Python do that VBA cannot do? What can VBA not do versus what is VBA not allowed to do?

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for watching. Machine-/Deeplearning would be one example.

  • @cbbcbb6803

    @cbbcbb6803

    Жыл бұрын

    @@CodingIsFun Machine/Deeplearning would be an example of what?

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    @@cbbcbb6803 The answer to your questions: What can Python do that VBA cannot do. I get your point with open-source, by let us be honest here. I doubt that even if VBA would be open source, suddenly there will be .bas modules available that could compete with Sklearn, Tensorflow etc. (but this is just my two cents on that). You might have a different opinion, and that is fine. Cheers!

  • @cbbcbb6803

    @cbbcbb6803

    Жыл бұрын

    @@CodingIsFun So, VBA, or any version of BASIC, would be like a Johnny-Come-Lately? I am always a little puzzled about why some software, especially programming languages, can do some things but not other things.

  • @FalconFlyer75
    @FalconFlyer75 Жыл бұрын

    IMO python is windows 10 and vba is windows XP sure there’s plenty u can do on both but windows 10 is cleaner and more efficient also comes with programs that windows xp can’t run

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    Thanks for watching the video and sharing your opinion.

  • @harryriley2696
    @harryriley26969 ай бұрын

    VBA has a steep learning curve

  • @CodingIsFun

    @CodingIsFun

    9 ай бұрын

    Thanks for watching!

  • @josephdaquila2479

    @josephdaquila2479

    5 ай бұрын

    I would say online resources wise it's probably a bit tougher, but having the macro recorder helps a lot!

  • @mathijs9365

    @mathijs9365

    2 күн бұрын

    So learn vba. Everything else will be easier

  • @donharrold1375
    @donharrold137511 ай бұрын

    It’s hard to find useful information on VBA.

  • @CodingIsFun

    @CodingIsFun

    11 ай бұрын

    Thanks for watching. I have listed down my favorite resources here: pythonandvba.com/resources/

  • @armgeo6246
    @armgeo6246 Жыл бұрын

    for me, I'd stick with excel... python? no thanks...

  • @CodingIsFun

    @CodingIsFun

    Жыл бұрын

    That's cool. Happy Excel-ing! :)

  • @eth6706
    @eth67062 жыл бұрын

    Bawahaha wtf this isn't even debatable. Python

  • @CodingIsFun

    @CodingIsFun

    2 жыл бұрын

    Thanks for watching the video & your comment!

  • @NieImieZLosowymiLiczbami
    @NieImieZLosowymiLiczbami3 күн бұрын

    if you dont want to suffer you shouldn't learn VBA

  • @CodingIsFun

    @CodingIsFun

    3 күн бұрын

    😦