Тёмный

Will Python Kill VBA in 2021? 

Excel Macro Mastery
Подписаться 84 тыс.
Просмотров 338 тыс.
50% 1

Will Python Kill VBA in 2021?
Python has become very popular in the last few years. It is often used with Excel instead of VBA. In this video I take a look at Python and see how it compare to VBA. The videos cover the following:
* A Brief history of Python and VBA
* What are Python and VBA used for?
* Writing Code - Python vs VBA
* Filter data with a few lines of Python
* Running Python from Excel
* 3 Simple Pros of using Visual Studio to write Code
* Installing Python applications on other machines
* Pros and Cons of Python
* Will Python Kill VBA?
#PythonExcel #PythonVBA #xlWings
SUBSCRIBE TO THE CHANNEL: bit.ly/36hpTCY
DOWNLOAD THE SOURCE CODE FOR THIS VIDEO: bit.ly/3jZZNwO
Excel VBA Training
The Excel VBA Handbook Course(TheExcelVBAHandbook.com)
Webinar Archives - 60+ Hours of VBA training(excelmacromastery.com/excel-v...)
Free Excel VBA Resources
Excel VBA Articles (excelmacromastery.com/vba-art...)
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + C 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
Search the word last searched for: F3
Auto complete 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)
Table of Contents:
00:00 - Introduction
00:27 - Brief history of Python and VBA
01:46 - What are Python and VBA used for?
02:34 - Coding Task - Python vs VBA
06:36 - Run Python from Excel
08:02 - 3 Simple Pros of VS Code
09:34 - Installing our Python Application
10:44 - Advantages of Python over VBA
12:01 - Will Python Kill VBA?

Наука

Опубликовано:

 

18 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 847   
@lucienay7803
@lucienay7803 3 года назад
An important advantage of VBA over Python is that user can "record" their actions and Excel will "translate" it to Macros. So user needs not build it from scratch. User needs only a bit VBA knowledge and it's sufficient enough to run it from time to time. May not sound nice to hear, but it is really a nice feature when beginners are making their applications.
@abexlconsulting9557
@abexlconsulting9557 3 года назад
You are more than correct.
@morgadoapi4431
@morgadoapi4431 3 года назад
Another advantage of VBA and Python is that you should not touch these, at all, ever.
@abexlconsulting9557
@abexlconsulting9557 3 года назад
@@morgadoapi4431 why?
@luvlycan
@luvlycan 3 года назад
I'm working as VBA developer since last 4 years and honestly I'm feeling that now this language is becoming obsolete. :(
@morgadoapi4431
@morgadoapi4431 3 года назад
@@luvlycan I would even say it's obsolete since 6 years.
@dimonovych
@dimonovych 2 года назад
1. You can write your own function in VBA and call it with "one line of code only" 2. There are extensions for VBE for additional functionality, such as grouping parts of code. 3. There is also spell check in VBE, it makes spaces after commas automatically) I don't say Python is bad, but those advantages didn't argue me)
@pabloraindogarcia8107
@pabloraindogarcia8107 2 года назад
Exactlty!! X2
@logic3686
@logic3686 3 года назад
I've already created so many functions/sub routines in VBA that keeps me from writing out common code that writing new subs in my workbooks is pretty simple. Plus I work in an environment where the big factor of installing python on end users computers that use my workbooks is just not reasonable for me. So no, the convenience of VBA being already part of an excel workbook I'm sharing that the user doesn't have to install a 3rd party to use is a big factor for me.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing! That is a factor for many people.
@rushrush6754
@rushrush6754 3 года назад
Your right, python is powerful in data Analytic but can't be compared with vba that was built specifically for Microsoft software. vba is obviously more powerful in excel again python cannot replace it completely
@htchd0211
@htchd0211 3 года назад
@@rushrush6754 Same here.
@wisetank135
@wisetank135 3 года назад
@@Excelmacromastery is Microsoft releasing a MS version of python like script code in excel?
@josipsuflaj8371
@josipsuflaj8371 3 года назад
@@wisetank135 It seems to me Microsoft is trying to push all to the cloud. M365.No Vba there, not sure about python. All hype about power apps, power automate and powerFX as underlying logic facilitator. On the other hand it is still very 'raw' and more bot, teams orientated Just my impression. Big companies will be 'nudged' there. Nevermind 'success' of sharepoint that tried that few years ago
@JHatLpool
@JHatLpool Год назад
The big advantage of Excel (+ VBA) is that it is just everywhere. With VBA, you can get started quickly and make a quick assessment of time to be spent/ importance of your proposed application. VBA and Python will live side-by-side for a few years to come.
@michaels1813
@michaels1813 10 месяцев назад
No need to install additional tools. I can be sitting in a meeting and start to code.
@jimclay4775
@jimclay4775 3 года назад
I use Excel and VBA to review geochemical data sets for groundwater monitoring. Recently I have been doing data processing in Excel followed by a handoff to R for data visualization graphics. My data sets aren't big, but they are too large to simply do a visual inspection of the numbers and draw confident conclusions. This video has inspired me to take a look at Python. Thanks!
@H270127
@H270127 3 года назад
Another excellent video from one of the very best around, thank you so much. So funny because yesterday I finally decided to start learning Python.
@PiroMat15
@PiroMat15 3 года назад
"Company program restrictions..." That's how my adventure with VBA begins :) And it's great due to easy installation or "no installation needend".
@mzucs
@mzucs 3 года назад
Same here
@joseryanquiatchon7330
@joseryanquiatchon7330 3 года назад
Exactly. Develop and throw away
@_Dearex_
@_Dearex_ 2 года назад
This
@lianvitos
@lianvitos 2 года назад
So true. I work in a worldwide operating company and they allow no extra software here. Even Visual studio is forbidden, I have checked today. If you request an exception, you are personally responsible for the security of the software. I will never sign that.
@petrmercedes1868
@petrmercedes1868 2 года назад
unfortunately also.
@moekyawthu8861
@moekyawthu8861 3 года назад
I leraned a lot from u. Thanks a lot. Now I use Excel VBA for details process in Excel. Python for other general things.
@davecks3042
@davecks3042 2 года назад
Brief and concise is your explanation in a single short video . Thanks
@Zavyyn
@Zavyyn 2 года назад
When automating and optimizing for others, I find the user wants to open as few applications as possible, leading to preference for VBA as macro/module solutions in Excel and complex Access databases (Especially if those databases already exist). Often, if I consider doing something in Python instead of using VBA it is because it is a one-time task that will not require training somebody.
@changnoiboi
@changnoiboi 2 года назад
Excellent, thank you Sir. Just getting into VBA & Python and this has helped guide me to my next learnings
@rahul7rock
@rahul7rock 3 года назад
I am using both python and VBA as of now. But will stick to one which you are teaching in near future 🙂
@sinus2220
@sinus2220 3 года назад
Fantastic video! I'm currently in the process of automating not only excel spreadsheets but also web and file operations at the same time. Granted, you can do all of this with Excel and relevant reference libraries, but it seems Python would be more robust and flexible. Most probably I'll be using both in conjunction :) I hope VBA will remain popular forever as I like this coding language very much. Thank you for putting all of the essential information in such a concise yet very informative clip!
@Excelmacromastery
@Excelmacromastery 3 года назад
VBA will be around for a long time to come.
@fischziege
@fischziege 3 года назад
Corporate desk slave here: our part time student team member likes to work in Python and his results are great. We as an organisation rely on basic office tools, so deploying solutions as Python scripts or apps is cumbersome and we lack people who can support it. Would love to see Python being integrated in Office, would get me off my lazy behind and learn some more...
@jvdb5509
@jvdb5509 3 года назад
This is the single reason VBA is still so widely used. I develop in VBA for this exact reason.
@johnwayne8059
@johnwayne8059 3 года назад
Rather I want to see python integrated everywhere, not only in office products, just BTW! You should kill your lazyness and start as soon as possible with python, caused by python is an allrounder. It's amazingly powerful and can be used for AI as well! Beste Grüße 🤟😎
@biskutnation
@biskutnation 2 года назад
Office script will be available as an alternative.
@adastraperlana
@adastraperlana Год назад
@@biskutnation 2 words. Monthly billings. Honesty if i were to start a business I would seek of a way to to it exclusively with open-source. If the company gets big, private software will cost you millions per month.
@simonghislain
@simonghislain 2 года назад
I had 3 moments during which I was like "yeah but then you would need to do this" and then you immediately talk about it. This shows your great mastery on the topic. I completely agree with your conclusions. Thank you for this video !
@pshamrock787
@pshamrock787 3 года назад
I use both. Now that I've learned about the excel wings, I'll use both a lot more.
@1612ganesh
@1612ganesh 3 года назад
Really you are awesome. I watched your all videos and learning VBA.
@peterlilley6819
@peterlilley6819 3 года назад
Great video Paul, I had been evaluating this myself, I had heard, but not qualified that Python was significantly slower than vba at runtime.
@Excelmacromastery
@Excelmacromastery 3 года назад
I haven't done any benchmark testing yet so I can't say for sure. For the Filter task in the video it does run slow compared to VBA.
@Ashish-2319
@Ashish-2319 3 года назад
Great explanation sir. Indeed you have cleared many doubts.❣❣
@shashivishwakarma6302
@shashivishwakarma6302 3 года назад
Thanks kelly exactly I needed please make more videos thanks a lot
@ahrorkuldashev9603
@ahrorkuldashev9603 2 года назад
Really appreciate your time and effort to create this great educational video.
@NZBruceman
@NZBruceman 3 года назад
Thanks. Great summary. My company sells Excel tools that integrate with Oracle EBS, mostly in the US. We have employed VBA now since Excel 97 and there are up to 50,000 lines of code in some of the tools. Never underestimate the reluctance of IT to install stuff on their networks/PCs. Having VBA available without an install has been an incredibly important advantage. We have new C# based software creating an Addin and the install is a new barrier we have to fight to overcome, every single time. VBA will never die. Look what happened to Microsoft when they dropped it in Office 10 for Apple! They were burned.
@Excelmacromastery
@Excelmacromastery 2 года назад
Thanks for shasring Bruce.
@zzzzzzzzzzzzzzzz9
@zzzzzzzzzzzzzzzz9 3 года назад
Nice video. I'm a heavy user of excel and I'm not very good at VBA, but i learning it. However, this video has got me thinking about switching to Python. The disadvantage is as you stated, installing the application on my work laptop
@wayneedmondson1065
@wayneedmondson1065 3 года назад
Hi Paul. Thanks for the view of Python with EXCEL. I've tinkered with it in a small way, but VBA (and Power Query) can currently handle the things I need to automate. Probably, that is true for many people. But, you never can discount an alternate way of getting work done. So, worth keeping an eye on the options (Python, Office Script, etc.). As always, thanks for your interesting perspectives and insights. Thumbs up!!
@Excelmacromastery
@Excelmacromastery 3 года назад
You're welcome Wayne. Definitely a lot of options nowadays.
@Unchained74
@Unchained74 3 года назад
Great video. Right now python is my favorite language. I'm still a newbie, but its actually pretty amazing to see the things you can do with it. I'm trying to get to where programming in python is just natural.
@Excelmacromastery
@Excelmacromastery 3 года назад
Keep going and you'll get there.
@FernandoRamosOstroswky
@FernandoRamosOstroswky 3 года назад
hello from Brazil !!!! Thank you for amazing videos that you posted. It's a hard decision for MS to integrate the phyton to VBA, because they created the typesript, but... It's a question of time, I think...
@FizzyMcPhysics
@FizzyMcPhysics 3 года назад
This is exactly what Ive been wondering for a while! Thank you!
@FizzyMcPhysics
@FizzyMcPhysics 3 года назад
This was really useful, thanks! I'm one of those people who makes macros in a large organisation. While I'm sure everyone could install Python on their laptops, it's just not practical to get them to do it and maintain it. Also, my code resources and knowledge are so mature now, I'm just too invested to make a change worthwhile. I'd also have to use a mix of Python and VBA to do things like formatting and emails.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing Benjamin.
@FizzyMcPhysics
@FizzyMcPhysics 2 года назад
@@Excelmacromastery After talking to a colleague, I think it should be seriously asked if Alteryx will kill VBA in the near future. I'm seriously afraid of Low/No Code solutions taking the spotlight soon.
@duncanmorrison9860
@duncanmorrison9860 3 года назад
Great video Please more videos on Python with Excel.
@richardgilbert9042
@richardgilbert9042 2 года назад
Python has some of the same advantages as R, but there's a lot more to Excel applications than just a little data read/filter/write. I have written apps in VBA that dynamically modified the UI in Excel, changing menu options based on queries that are based on initial user selections. The user then made additional choices from the dynamically populated lists, and those choices were used to build SQL strings, query an external DB, process the query results, and populate reports and charts in the workbook. Complicated? Well, yes, but I wouldn't have wanted to try it with Python. All the necessary code and structure was encapsulated in the saved Excel workbook without 3rd party appendages to be installed/managed. Power Query wasn't available back then, but I'd probably look at integrating that with VBA in the applications I wrote before messing with Python/Excel hybrids.
@Deepanshu302
@Deepanshu302 Год назад
Can you teach me VBA. With real uses.
@edudecnop
@edudecnop 2 года назад
I didn't know Pandas was able to read and write in Excel files, that's good news for me. I tried to include an add-on for python application in Excel in the past (don't recall which one), but it let the program quite slow, so I gave up trying to use them together. I'll rethink about this possibility in future soon. Thanks for the video!
@yeoyinghui
@yeoyinghui 3 года назад
Very good comparison. Will love to learn from you too!
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for watching!
@david_apraiz
@david_apraiz 2 года назад
Thanks for this very instructive video!!
@MrMallesh1
@MrMallesh1 3 года назад
nice video , lot of doubts initially how to use python in vba. Doubts got cleared. add new videos on python I love your videos nicely explained. thanks
@onokeita7977
@onokeita7977 3 года назад
This is I really needed information!! Thanks 👍👍👍
@Excelmacromastery
@Excelmacromastery 3 года назад
Glad it was helpful!
@elegantgrasshopper1060
@elegantgrasshopper1060 3 года назад
Your videos are just wonderful. Thank you so much.
@Excelmacromastery
@Excelmacromastery 3 года назад
Glad you like them!
@excelrobot
@excelrobot 3 года назад
Actually, you can do the same thing as results = df.loc[df['Geography'] > 60] in VBA in one line of code if you use Ctrl-T to make your range an Excel table named "marks". VBA would be: results = Application.Filter([marks], Evaluate("marks[Geography] > 60")).
@Excelmacromastery
@Excelmacromastery 3 года назад
Nice - I know there are many ways to filter the worksheet data. Filter and Evaluate functions tend to be slow with a lot of data. But what I was demonstrating here was to filter an array rather than the worksheet data. Arrays are very fast to use in VBA but sadly lacking in functionality.
@excelrobot
@excelrobot 3 года назад
@@Excelmacromastery Since FILTER is one of the new dynamic array functions, it is blazing fast in Office 365. I just did a test with 200,000 records returning 14,000 records in the filtered set and it was pretty much instant (
@KaiWeissmann
@KaiWeissmann 3 года назад
@@excelrobot Hey, I just tried your suggestion and it gives me an error2015. I have a table named "Stammdaten" with a column "Provisionsanteil". My code looks like this: Sub NeuerFilter() Dim results As Variant results = Application.Filter(["Stammdaten"], Evaluate("Stammdaten[Provisionsanteil]>3")) End Sub Is there something I did wrong?
@excelrobot
@excelrobot 3 года назад
@@KaiWeissmann Try [Stammdaten] instead of [“Stammdaten”].
@gaitanpol
@gaitanpol 2 года назад
In fact like many coding langage, there as highly specialized libraries / routines that one need to learn to get things done. I am not sure the syntax is really what makes the difference.
@omerdurak884
@omerdurak884 3 года назад
Your explanations are very useful and comprehensible as in your other videos.
@Excelmacromastery
@Excelmacromastery 3 года назад
Glad you like them!
@elicesroman7500
@elicesroman7500 3 года назад
Thx Great video. The problem with python is that commercial organization refused to install open software because it is not supported. In terms of efforts - rewards I think that python is much more better than VBA Excel. I think with a few hours of coding python will allow you to do much more than VBA Code.
@shehab976
@shehab976 2 года назад
I think they know python as snake rather than a programing language😁
@Thunderin11
@Thunderin11 2 года назад
Very interesting video. But... As a VBA die-hard who has been making a living out of it for almost two decades, I have to shout out loud that VBA is here to stay! Maybe Python has some advantages when it comes to analyzing data but VBA is used for much more than analyzing data. It is used most commonly to automate Excel and other Office software. It was not referenced in the video how easy / useful it is for Python to automate Excel environment objects for instance (e.g. charts, shapes, pivot tables and list objects). This debate "Will Python Kill VBA" reminds me how in Excel forums between 2010 to 2012 people strongly argued that Excel would disappear soon because Google Sheets is potentially a much more superior product to Excel. Well reality proved it otherwise. Today Excel is by far the most superior spreadsheet product without any competition whatsoever in sight.
@alfredoprime5495
@alfredoprime5495 2 года назад
I agree completely. Data analysis is secondary for what we use Excel at work. Charts, pivot tables, regular tables, userforms, custom functions, events,... the list goes on.
@MrAbrandao
@MrAbrandao 2 года назад
I use Excel VBA to automate web pages. But now I am stuck with the dead of Internet Explorer....
@TheStenius
@TheStenius 2 года назад
We all know it: in most companies, you are considered the (only) „Excel-freak“ in the team if you mention your VBA-skills. Some people even still don‘t know what VBA is. My Boss, Professor/Director of a big science institute, never heard if it. That are the people you have to design your xlsm-files for in many cases. For some of them, it‘s a challenge to make those small adjustments on their Excel to run all of those files. Now we shall ask them to set their systems up to enable Python-code in Excel? Haha, good joke. I would change right away, if MS would implement Python to MS Office. But since that will never happen…
@manndipp
@manndipp Год назад
This was immensely helpful in clarifying how to use python in excel
@rrrprogram8667
@rrrprogram8667 2 года назад
Absolutely great video.... You are the master in your area ....there is no 2nd to you
@umeshlangade9231
@umeshlangade9231 3 года назад
You are always upto the recent trend.. thanks for sharing valuable knowledge 😊
@Excelmacromastery
@Excelmacromastery 3 года назад
You're welcome.
@karchunchong7104
@karchunchong7104 3 года назад
Thanks for bringing this possibility to my attention. I always like to learn python but don’t have the reason to do so. Now, that has changed.
@Excelmacromastery
@Excelmacromastery 3 года назад
Happy to help!
@shoryaarora1464
@shoryaarora1464 3 года назад
Thank for making this video you cleard my doubts towards VBA and python
@Excelmacromastery
@Excelmacromastery 3 года назад
You're welcome.
@FlowerEconomics
@FlowerEconomics 2 года назад
Thank you for the excellent and pertinent information. Perhaps VBA can still be used kind of like pseudocode, before you write a Python script.
@ChillGuy511
@ChillGuy511 Год назад
Not even 2 minutes in and already subbed!
@wsross3178
@wsross3178 2 года назад
I used to work with vba due to installation restriction. Later on i get to work for excel reporting from unix server with built-in python. I get green light from the IT security to install pandas offline and it really replace a lot of manual spreadsheet process.
@edrobinson8248
@edrobinson8248 2 года назад
I had to stop this video half way to break off and tell you how taken aback I am. Enlighteneing and Very well presented. Thanks (VBA author)
@CodingIsFun
@CodingIsFun 3 года назад
Great video, as always! Totally agree with your points. I personally like to use VBA & Python depending on the use case. When it comes to deploying solutions to co-workers, I usually prefer VBA. The conversion from a Python File to a standalone executable can sometimes be a solution. Yet, in a corporate environment, mailing .exe is often not allowed.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing your experience.
@daviddeclercq9998
@daviddeclercq9998 3 года назад
Yes but you can put the executable on a shared drive and run it from there
@PeterGeras
@PeterGeras 2 года назад
My company blocks mailing .exe as well, so I get around it by zipping the file, then zipping the zip with a password. If the mailing server can't see the contents then it allows it through.
@macedoniojr
@macedoniojr 2 года назад
@@PeterGeras cool tip!!!
@laravelisbullschitt3281
@laravelisbullschitt3281 2 года назад
Most end users are not allowed to install software. Only approved software may be loaded onto machines, usually there is a committee that approves the software that gets on the machines....and it can take YYEEAARRSS for anything to get approved....there are some companies I know who still maintain everyone should be using IE and Chrome / Edge is completely banned. These companies are few and far between now but it is usually the case the larger the company, the slower change will be. The only thing that looks poised to kill VBA is the adoption rate of teams based Office 365 thanks to the fludemic.
@thecodfather7109
@thecodfather7109 3 года назад
Exactly the video I needed
@Excelmacromastery
@Excelmacromastery 3 года назад
Glad you like it.
@TheVidit143
@TheVidit143 2 года назад
Hello father
@ziggle314
@ziggle314 3 года назад
Very timely. I have been thinking about running Python instead of VBA. Thanks!
@Excelmacromastery
@Excelmacromastery 3 года назад
You're welcome.
@sathish1202
@sathish1202 3 года назад
Thank you for your analysis
@tjchance5111
@tjchance5111 3 года назад
Very interesting, I was wondering if I should use Python or VBA, now I have a better idea. Thank you Paul!
@Excelmacromastery
@Excelmacromastery 3 года назад
You are welcome!
@trud811
@trud811 3 года назад
Interesting video. But the for the analysis the current Microsoft solution is PowerBI, and the client - PowerBI desktop. For the Worksheet interaction, the main VBA power is the ability to record the macro(that is missing in Python)
@NTTCode
@NTTCode 2 года назад
My company puts hard restrictions on any software that is excluded from the acceptable software list which is provided by IT Dep, so that if I (maybe anyone other than me) want to use python instead of VBA then I need to take some approval from IT department (very very hard to get it). Even MS Access is not accepted for my department, and MS Office Suite only contains 4 applications: Excel, Word, Powerpoint, Outlook. So in my opinion, Excel VBA is the best stuff for data manipulation in office environment. I totally agree with Paul.
@ImprovisedExpletiveDevice
@ImprovisedExpletiveDevice 3 года назад
Thanks for doing this. Another great vid.
@Excelmacromastery
@Excelmacromastery 3 года назад
You're welcome.
@barttitulaerexcelbart9400
@barttitulaerexcelbart9400 3 года назад
Thanks a lot, really interesting. I would love to see a video where you compare power query with python. I would also like to see some real live cases where Excel reaches its limits and Python can take over..
@Excelmacromastery
@Excelmacromastery 3 года назад
Great suggestion!
@justinlee9789
@justinlee9789 3 года назад
Time series analysis. For instance how do you make a rolling covariance matrix? Doing it with excel will cause a dimensionality nightmare
@macedoniojr
@macedoniojr 2 года назад
Simple example (not real python fan yet): Python can read 2GB csv file with millions of rows. Excel will load 1mln 48k rows and cut off the rest or throw error....
@barttitulaerexcelbart9400
@barttitulaerexcelbart9400 2 года назад
@@macedoniojr with power query in Excel this is not an issue
@alexaneals8194
@alexaneals8194 2 года назад
@@macedoniojr In reality if you are doing that type of work in Excel then you are wasting your time. A relational database can handle that data a lot quicker and with more efficient results. You can use Excel as a frontend and have the database do the grunt work.
@stevennye2441
@stevennye2441 3 года назад
Your videos are always well done and thought provoking. I having been looking at R and Python and the comparisons of which to use. It seems as though Python is the solution for the less mathematically inclined and gives a broader array of possibilities than R. R seems to be more succinct for data visualization, which is much of what I do. R has been around longer and seems to be the preference for post graduate level scientist, whereas I saw some videos of high schools teaching Python. My guess is if you are under 30, python is a better long term investment. On the other hand if you a post graduate level scientist R first, with Python secondary may be the right route. I am early on in my expansion from VBA, but it seems as though VBA fills a substantial hole and if I had one tool I would stick with VBA as Microsoft will figure out how to incorporate Python or copy it. Since I need to broadly share work and VBA seems mostly about making Excel users more productive it is the foundation for my work.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing Steven. I haven't used R so it was interesting to read your thoughts on R vs Python.
@Freddyhb1
@Freddyhb1 2 года назад
This is the best video I've seen on RU-vid on Py vs VBA
@Excelmacromastery
@Excelmacromastery 2 года назад
Thanks Fred
@24Boli
@24Boli 3 года назад
As usual, fantastic video! I guess that Python won't be able to "kill" VBA in a short term, but eventually is likely to do so
@excelrobot
@excelrobot 3 года назад
Before VBA was XL4 macros, and they are still supported after being replaced by VBA almost 30 years ago. Even if Python or TypeScript replaces VBA, it will live on for another 30 years from now.
@SimpleExcelVBA
@SimpleExcelVBA 3 года назад
I thought than after VBA I will go into the TypeScript direction, but now I should also consider Python.
@area_surveyor_k2217
@area_surveyor_k2217 2 года назад
Great job. Thanks for posting.
@Excelmacromastery
@Excelmacromastery 2 года назад
Thanks for watching!
@ApteryxRex
@ApteryxRex 3 года назад
Great video. Thanks so much. What IDE are you using? The active 'help' looks great.
@Excelmacromastery
@Excelmacromastery 3 года назад
Visual Studio Code.
@gregorymathy2782
@gregorymathy2782 2 года назад
Both are fine for me it depends on what you need to do. Pandas is a great tool that’s being said excel can be seen also as a ready to go graphical interface. whereas in Python you also need to create it … so my dream would be to get a more dedicated Python integration with excel and MS office that would be so great …
@edravtv4367
@edravtv4367 9 месяцев назад
dream coming true...
@arav8431
@arav8431 Год назад
Great explanation, please upload python with excel manipulation more videos 👍👍
@g07denslicer
@g07denslicer 2 года назад
4:26 wait a minute, you just have to supply the sheet to it? You don’t have to specify a region? What if there’s an unrelated table off on the right of this one? When you tell python to print the 3rd line, will it print the results of the grades table, a bunch of blank spaces, and print the same line of the other table?
@dh8203
@dh8203 2 года назад
Python looks great, but VBA comes integrated in Office. Your conclusion does a great job of laying out why many people, including myself, won't be switching to Python any time soon. I create things for other people to use, it can't require them to set up Python and then fail when they move to a new machine, or re-install Office.
@SolidSnake59
@SolidSnake59 3 года назад
I would love to see your video where you teach Python!
@Excelmacromastery
@Excelmacromastery 3 года назад
I may do more in the future.
@TheMcHonky
@TheMcHonky 3 года назад
@@Excelmacromastery That's really another strength of Python. The amount of quality learning material, especially for getting started with Python - Corey Schaefers channel is my favorite. For Excel - well there is this channel :-) which is awesome, but in general there is not that much out the for improving VBA skills.
@danielcook1271
@danielcook1271 3 года назад
@@TheMcHonky this 100℅!! I'd love to master vba but can't find enough decent materials. I've a number of books but they more show you what you can do with vba rather than teaching it. Whereas Crash course python is just an amazing introduction to python
@johncheung4905
@johncheung4905 3 года назад
@@Excelmacromastery Please do. Your explanation is superb.
@johncheung4905
@johncheung4905 3 года назад
@@danielcook1271 I learn by doing. I suggest you try this way too. Think of a problem, real or imaginary, in Excel. Then begin writing code for solving it. Whenever you are stuck, search the internet for the solution. You will spend a lot of time in the searching and testing out which solution works best, but this experience will prove very useful.
@MahendraTita
@MahendraTita 3 года назад
Great video, Thanks for sharing
@Malignvs
@Malignvs 3 года назад
VBA gives you the ability to troubleshoot the running code line by line with F8, breaks points and dragging the resume point at will. This is really powerful, especially when you're dealing with 100's of lines of code in one module.
@Excelmacromastery
@Excelmacromastery 3 года назад
You can debug Python code.
@Malignvs
@Malignvs 3 года назад
@@Excelmacromastery Can you do it in a similar way, though? I only wrote some code in IDLE, and didn't see any options to do it.
@johncheung4905
@johncheung4905 3 года назад
@@Malignvs I am a beginner at python too, but had a lot of experience with VBA. VS code can do debugging similar to VBA, ONLY if you add breakpoints to the lines of your code where you want to pause. Then you press F5 to proceed from one breakpoint to another. You can add the variable you want to check by putting it into the WATCH list.
@MatthewTaylor86
@MatthewTaylor86 3 года назад
@@Malignvs Debugging Python with VSCode is pretty similar to doing it in VBA! You can see all the local variables, you get an immediate window, etc, plus lots of nice extras like updated locals being highlighted and seeing the values in the code itself.
@Malignvs
@Malignvs 3 года назад
​@@johncheung4905 ​ @M Taylor Thanks for the explanations! Still, it looks like you can't go line by line (which helps tremendously) without inserting the break points yourself. However those break points should suffice in most cases. :) I need to familiarize myself with VSCode. :)
@kennethstephani692
@kennethstephani692 Год назад
Great video!!
@ymlaos9850
@ymlaos9850 2 года назад
I have stopped using Excel for 2 years now. Managed to exit gracefully and use python for doing my LET. L=Load (MBs of csv
@danielcook1271
@danielcook1271 3 года назад
I love VBA use it daily for my job and at home. Self taught but I'm still at a beginner \intermediate level and I've reached the point where I can use vba to do all I need I just don't think my code is particularly efficient. I find remembering the syntax tricky and still Google the simplest things. I'm struggling to find resources to help me make my vba code better. Just in the last few weeks I picked up a couple of books on python and started learning it. I've already learnt so much and find it easier \ more intuitive than VBA. Also the IDEs are very helpful as you mentioned in your video. I think I'll probably continue to use both languages. There's just something kinda fun about VBA. Everyone's learning python and I think it'll be useful to keep up vba if only to mAintain macros used at work... Brilliant video btw, it's a question I've been thinking about a lot recently but isn't office scripts going to be the thing that replaces VBA??
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for the feedback Daniel. Coding in Python is definitely more convenient once you get up and running. Office Scripts isn't confirmed as a replacement for VBA.
@alanhood9675
@alanhood9675 2 года назад
For me it was, " Is it worth learning VBA ,to do something that python can do just as well (or better) ,when I want to learn python anyway". You convinced me, I'm doing it in python!
@drblackra
@drblackra 2 года назад
@ichbrauchmehrkaffee5785
@ichbrauchmehrkaffee5785 2 года назад
Wise choice
@derpythecate6842
@derpythecate6842 2 года назад
Not for malware. VBA is still really handy for executing code on unsuspecting victims via macros.
@ChristianBeringer
@ChristianBeringer 2 года назад
One thing was missed out: Big Data and Machine Learning and connection to database-servers. VBA is quite useless for ML or big data analysis in databases, while Python offers many libraries for machine-learning, computer-vision, simulations and even 3D-data visualisation.
@sandragrushoff9844
@sandragrushoff9844 2 года назад
yes - but ML is big data not real learning. Show an amoeba enough pictures of a cat and it can do the task. ML is interesting but it's not learning or intelligence or with the whole world networked the singularity would have blown us away by now.
@hello201014
@hello201014 3 года назад
Maybe you should do a video on applications where python is an overkill to develop prototype code? I'd imagine for simpler tasks, making a case for python would be a little difficult
@krisvantuerenhout537
@krisvantuerenhout537 2 года назад
Once Python will be installed on as many machines as Office , it will take over i think. For IT people for sure. For NON-IT people i don't think so (not yet). Recording a macro is so easy for the majority of tasks you want to automate. Far from optimized code , but it gets the job done.
@Otavio987
@Otavio987 3 года назад
Great video! Thank you!
@Excelmacromastery
@Excelmacromastery 3 года назад
Glad you liked it!
@toddbrannon6262
@toddbrannon6262 3 года назад
Excellent video! I work with a team that develops tools in Excel and Access. VBA and SQL are king (and queen, I guess?). There has been some discussion about using Python, but it becomes an issue of support. I am the only one on the team with any Python experience and if I were to leave, they would be forced to backfill with someone who has Python experience. The elephant in the room is that Python does not come preinstalled on Windows machines like it does on Mac machines. This is a huge problem and some of the comments here have already mentioned this. Until that happens, if ever, I think you will see adoption of Python as an alternative to VBA be painfully slow - at least within companies that use VBA like mine does.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing Todd. You make a very good point.
@Moh23Moh
@Moh23Moh 3 года назад
can you make a vba code that open the browser and go to a page reads a captcha fill it in a text box in the web page and press enter and the code should work at a certain time
@timdunbar9426
@timdunbar9426 3 года назад
Hi Paul, I love your videos and web pages. They have been very helpful to my in my VBA programming. I have recently learned Python, pandas, numpy and scipy in order to better understand and perform machine learning. That is part of where Python really shines, but Excel VBA has a great advantage in that it is so easy to make a GUI with it. My goal is to deploy an Excel VBA GUI that runs Python machine learning scripts, but I cannot install Python on the machines that I wish to deploy the Excel VBA GUI to. Is it possible to write a Python script and freeze it into an executable and have Excel VBA call it like one could call a function written in Excel VBA?
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks Tim. Have you tried using Shell from VBA? I haven't done this myself so I don't know if it will suit what you are trying to do.
@timbrockley
@timbrockley 3 года назад
great vid - good info - well explained
@kjinnah
@kjinnah 3 года назад
Great Video, thank you. Python's universality is definitely growing into many areas, including IOT hardware, etc. Data manipulation is certainly part of using excel. However, In developing Excel apps I find VBA code has developed closely with the nature of excel, like formatting, cells, ranges, tables and indeed whole sheets, for example creating & printing invoices, orders, etc, or printing well formatted reports etc. Also the use of VBA forms to input data, and show results. In addition VBA is closely tied to excel functionality, for example VBA code to run upon 'double click' on a cell, or range by VBA code in a module or on within a sheet etc. Also VBA code can be written by 'recording' actions and the just modifying the code to clean it, or just as a way to learn VBA on the fly as it were, especially if using excel built in capabilities such as pivot tables, data visualization tools or indeed Power BI. I just mention some issues for considerations in a wider question of Python Vs. VBA for new users who may be weighing a way forward.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing. Some interesting points.
@jcaskey06
@jcaskey06 2 года назад
I agree. It is just so darn easy to create a quick macro, then spend a little bit of time to clean it up to remove the excess junk. It creates a template as a starting place. Very useful for somebody that doesn’t do it all the time and doesn’t have the commands memorized.
@goombakiwi
@goombakiwi 3 года назад
I've written VBA for some time. My experience shows that some companies are already apprehensive about allowing employees to use the available VBA. I had one employer disable access to macros, until they realized our ADI's were dependent on them. Staff are generally not hired for programming skills and the push to construct workbooks for basic excel users will continue to be prevalent. With increased cloud usage and SharePoint; MS appears to be focusing on Typescript(Javascript). The prospect of bringing on an enterprise application for Python; is not promising. The recent ransomware news might further diminish employee access to automation features.
@Excelmacromastery
@Excelmacromastery 3 года назад
Thanks for sharing. You make some interesting points. TypeScript has still a long way to go to compete with VBA and it's not clear if that is Microsoft's aim.
@Mandelbrot567
@Mandelbrot567 3 года назад
Excellent information, how about a comparison of python vs typescript for excel?
@Excelmacromastery
@Excelmacromastery 3 года назад
It's a good idea. I'll keep it in mind.
@cuejorge2003
@cuejorge2003 2 года назад
I totally agree with you. VBA is part of Excel and those of us who have used it for many years, as you said, we already have written codes that will not work if VBA is eliminated
@milesdedrick4632
@milesdedrick4632 2 года назад
Well that's actually part of development. As languages depreciate in value and newer ones start to replace them it warrants a rewrite/recode
@sandragrushoff9844
@sandragrushoff9844 2 года назад
Intresting vid - I'm a VBA programmer, among other languages, so i've got most of this pretty quickly. I think the main take away point is Python integration, which I think may get rid of VBA (eventually). Otherwise it's just a library. Not only that I can shell out to exe files i've created in another language, or write to an ini set of instructions then do the same. Ultimately Python (in context of VBA) is little more than another library, and there's a lot of libraries, including access to the windows API where I think a lot of power lieth. I'm interested enough to take this seriously though especially as I think everyone will need Python eventually. Moreover - if VBA is rich Italian, Python and others are barked military instructions in a very accurate manner, a far more limited lingo for arguably greater function. VBA programmers may lament the fact they've learned zillions of commands! I'd also be interested to know about the advanced "big data" applications. VBA can do everything in this video and greater. So i'm guessing that if you import 2 million cells and start zooming over them in Python, then VBA may be a frozen spreadsheet and the other may be a quick but two step process then a populated spreadsheet. Cheers for the vid.
@ricos1497
@ricos1497 3 года назад
Great video. Think you managed to highlight all the key points! For me, it will not kill VBA as Microsoft will not allow it to. It looks increasingly like they are going to push Typescript as the VBA successor and it's integration into Excel online backs that up (can Python be used in browser Excel? Does anyone care?!!). With the advent of Power Query and Power Pivot (and now LET and LAMBDA), I have to say that my requirement for VBA is becoming less and less (focusing on the cosmetics rather than real requirements) and the types of things I'm retaining in VBA are things that would be easily replaced in Office Scripts or similar (refreshing workbook when opened, selecting particular cells etc). I'll certainly take another look at Python in the coming weeks and months as I'm torn between it and Typescript. I think I'd go down the route of creating a stand alone Python application though, rather than using Excel as the interface (with the Filter button and run coding via VBA). Although, I have to admit, that I do like the fact that in Typescript you get access to the "Panes" in Excel so that your application integrates as part of Excel. I'm guessing that can't really be replicated in Python in the same way.
@TheMcHonky
@TheMcHonky 3 года назад
I think Microsoft knows the popularity of Python, and they have a department the exclusively works with Python, and how to best integrate it the Microsoft ecosystem. But I think one of the problems replacing VBA with Python is that the Python ecosystem is constantly evolving, and I assume that finding a way to support all the userpackages is kind of difficult.
@johnwayne8059
@johnwayne8059 3 года назад
Thanks mister! Is it also possible to generate an executable from your python idle and start this exe file via vba or isn't it? I guess if you use VS19 it should work to get the executable easily but never tried to start an exe file with vba yet!😇 I'll shortly make a request to my friend Google!😂🤣😂 Great video sir!👍🤟😎
@kelvinteoh9058
@kelvinteoh9058 2 года назад
I felt that the example used in this video could have easily been performed using formulae rather than vba which is what I do these days because vba requires troublesome signatures from our ICT security department on my company laptop. The main reason I have used vba was if I needed to execute event based calculations or actions which formulae can't. In fact, because vba is quite inefficient in some aspect of interchanging data, I tend to use a worksheet as a form of registry to keep the last known dataset rather than keep it as a variable in code. My question to this longwinded comment is whether the Python add in is capable of these. Thanks.
@Jamesedwardkoch
@Jamesedwardkoch 3 года назад
Very good and important video. I am very well versed now in VBA (with a lot of special thanks to Excel Macro Mastery), but I have started learning Python quite eagerly. What was said about the setup required for Python is 100% true. I now have to keep a list of all the Python libraries I have installed so that if and when i want to run my Python scripts elsewhere, i first have to spend some time carefully making sure the other PC has got all it needs. The main benefit i have had with VBA is that people receive it so easily, they are all already familiar with an Excel file and they open it without hesitation. I believe i will use both languages extensively into the future, side by side, IF and until MS decides to incorprate Python. But i think they're going for Office Scripts.
@Jamesedwardkoch
@Jamesedwardkoch 3 года назад
Just another note, I am busy writing a nice little VBA app for my fellow varisity students. I can just email it to them. This project would not have been as easiliy doable with Python because of the setup. The irony is that the VBA project is to help them learn Python, lol.
@Excelmacromastery
@Excelmacromastery 3 года назад
:)
@kespartanobryan
@kespartanobryan 3 года назад
That would be great if you could show more about this mixture between phyton and excel Some more examples just like the ones you usually do. (Great video as always!!)
@Excelmacromastery
@Excelmacromastery 3 года назад
I may do more python videos in the future.
@paulnolastname9422
@paulnolastname9422 2 года назад
I enjoyed the video, but I'll be sticking with VBA. I have to create large PowerPoint presentations every month based on a month's worth of collected data, and while I am learning Python, I can't see it being very integrated in the Office suite with PowerPoint, Word and Excel.
@arunkumarnair001
@arunkumarnair001 3 года назад
Man that was a killer video
@r0ck3t3r
@r0ck3t3r 2 года назад
You can use PowerShell to access Excel/Office via Com Objects, and it's found everywhere Windows is installed. I'd like to see Office natively support development in PowerShell given it's easier to write than VBA and also a Microsoft technology.
@ionblaster7432
@ionblaster7432 2 года назад
Would love a video series teaching python
@gerhardkling
@gerhardkling 2 года назад
I use both - but tend to prefer Python. I also use Tkinter to create new GUIs, which can work on legacy Excel files.
@sandragrushoff9844
@sandragrushoff9844 2 года назад
you might want to include personal.xlsb and .xlam self written modules, you can call these all day long and send xlam modules to colleagues very easily. Integration is a big factor, guess the same point as i've just made below - but in favour of VBA, not just lack of Python integration.
@chanchalraj2592
@chanchalraj2592 3 года назад
Please start teaching us to Python... Thanks P.Kelly
@kevincen5727
@kevincen5727 3 года назад
Over last cup of years, with Python i have written applications to manipulate data in excel and automatically do things on website, google maps, office 365 and so on. I also used VBA few times when i just need some quick and dirty stuff to be done in excel alone when formulas are not enough. I guess the biggest problem with VBA is that all you can do stays in the realm of Excel, or Microsoft suite at most, while with python there's much more potential. I don't use the "record macros" that often as i can get solutions easily from VBA documentation or just stackoverflow. But i guess if you are beginner to coding then start with VBA is a good idea. Meantime always keep an eye on Python if you want to link your spreadsheet with other part of your process.
Далее
How to Replace VBA with Python(Step-By-Step Tutorial)
31:19
How to make your Excel VBA code run 1000 times faster
16:55
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Просмотров 10 млн
The right decision came to mind #comedy
00:12
Просмотров 421 тыс.
СЕРГЕИЧ ОПОЗДАЛ #большоешоу
00:58
Python In Excel: Microsoft Changed EVERYTHING
14:37
Просмотров 445 тыс.
How VBA Objects Really Work in Memory
17:46
Просмотров 52 тыс.
Python Vs C++ Vs Java!
4:41
Просмотров 451 тыс.
Introducing Python in Excel
19:01
Просмотров 1,5 млн
5 VBA Hacks Everyone Should Know in 2021
11:20
Просмотров 89 тыс.
APPLE совершила РЕВОЛЮЦИЮ!
0:39
Просмотров 1,9 млн