Will Python Kill VBA in 2021?
Ғылым және технология
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?
Пікірлер: 847
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
3 жыл бұрын
You are more than correct.
@morgadoapi4431
3 жыл бұрын
Another advantage of VBA and Python is that you should not touch these, at all, ever.
@abexlconsulting9557
3 жыл бұрын
@@morgadoapi4431 why?
@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
3 жыл бұрын
@@luvlycan I would even say it's obsolete since 6 years.
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
2 жыл бұрын
Exactlty!! X2
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
3 жыл бұрын
Thanks for sharing! That is a factor for many people.
@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
3 жыл бұрын
@@rushrush6754 Same here.
@wisetank135
3 жыл бұрын
@@Excelmacromastery is Microsoft releasing a MS version of python like script code in excel?
@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
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
11 ай бұрын
No need to install additional tools. I can be sitting in a meeting and start to code.
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.
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!
"Company program restrictions..." That's how my adventure with VBA begins :) And it's great due to easy installation or "no installation needend".
@mzucs
3 жыл бұрын
Same here
@joseryanquiatchon7330
3 жыл бұрын
Exactly. Develop and throw away
@_Dearex_
3 жыл бұрын
This
@lianvitos
3 жыл бұрын
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
2 жыл бұрын
unfortunately also.
Brief and concise is your explanation in a single short video . Thanks
I leraned a lot from u. Thanks a lot. Now I use Excel VBA for details process in Excel. Python for other general things.
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
3 жыл бұрын
VBA will be around for a long time to come.
Great video Please more videos on Python with Excel.
I am using both python and VBA as of now. But will stick to one which you are teaching in near future 🙂
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
3 жыл бұрын
This is the single reason VBA is still so widely used. I develop in VBA for this exact reason.
@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
2 жыл бұрын
Office script will be available as an alternative.
@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.
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.
Great explanation sir. Indeed you have cleared many doubts.❣❣
I use both. Now that I've learned about the excel wings, I'll use both a lot more.
Really you are awesome. I watched your all videos and learning VBA.
Thanks kelly exactly I needed please make more videos thanks a lot
Excellent, thank you Sir. Just getting into VBA & Python and this has helped guide me to my next learnings
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
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.
You can download the code(both Python and VBA) from the description below the video. *Quick note* on the VBA Array code in the video that many have commented on. I am aware that I can read the row directly from the range. What I was showing is this: Accessing ranges directly in VBA is extremely slow and gets exponentially slower if you are dealing with large data. That's why I use arrays. You can write from a range to an array in one line of code. It is fast and efficient. Reading through arrays is also very fast and unlike ranges the performance remains consistent as the size grows(see kzread.info/dash/bejne/fK51rtWdgdnQops.html) The problem is that once your data is in the array there is no sort, filter, slice etc. functionality. You have to write your own code to do this. (That's why I created an Array Class - see kzread.info/dash/bejne/jI2sw4-KXdG5iJM.html). In Python and Typescript(and most modern languages) it is trivial to do this. I see this as a big problem in VBA if you are dealing with large datasets. A new user writes code and it is running extremely slow. They either conclude VBA is slow and give up or they discover that using arrays will make the code much faster. Once they switch to an array they have now lost the range functionality that allows filtering, slicing rows/columns, sorting etc. They then have to write the code to do this or find it somewhere.
@Nic_Holas
2 жыл бұрын
there is no sorting and filtering in python either, it's in pandas library. what stops me from writing pandas for VBA and then claiming it's advantage of VBA. not trying to argue against or for either of the languages, just pointing out that often claimed advantage of python is libraries and those are really not part of the language. a real thing to consider in world of office apps (spreadsheets, small db) is ease of use and overall performance, and VBA wins, and even survives it's owner's intention to kill it.
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
3 жыл бұрын
Keep going and you'll get there.
Really appreciate your time and effort to create this great educational video.
This is exactly what Ive been wondering for a while! Thank you!
@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
3 жыл бұрын
Thanks for sharing Benjamin.
@FizzyMcPhysics
3 жыл бұрын
@@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.
This is I really needed information!! Thanks 👍👍👍
@Excelmacromastery
3 жыл бұрын
Glad it was helpful!
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
3 жыл бұрын
Thanks for shasring Bruce.
Very good comparison. Will love to learn from you too!
@Excelmacromastery
3 жыл бұрын
Thanks for watching!
Thanks for this very instructive video!!
Your videos are just wonderful. Thank you so much.
@Excelmacromastery
3 жыл бұрын
Glad you like them!
Thank you for your analysis
Not even 2 minutes in and already subbed!
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...
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
3 жыл бұрын
You're welcome Wayne. Definitely a lot of options nowadays.
Exactly the video I needed
@Excelmacromastery
3 жыл бұрын
Glad you like it.
@TheVidit143
3 жыл бұрын
Hello father
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
Жыл бұрын
Can you teach me VBA. With real uses.
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 !
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
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
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
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
3 жыл бұрын
@@KaiWeissmann Try [Stammdaten] instead of [“Stammdaten”].
@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.
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
3 жыл бұрын
Thanks for sharing your experience.
@daviddeclercq9998
3 жыл бұрын
Yes but you can put the executable on a shared drive and run it from there
@PeterGeras
3 жыл бұрын
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
2 жыл бұрын
@@PeterGeras cool tip!!!
@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.
Thanks for doing this. Another great vid.
@Excelmacromastery
3 жыл бұрын
You're welcome.
Great video!!
Your explanations are very useful and comprehensible as in your other videos.
@Excelmacromastery
3 жыл бұрын
Glad you like them!
Great video, Thanks for sharing
Great video! Thank you!
@Excelmacromastery
3 жыл бұрын
Glad you liked it!
Great job. Thanks for posting.
@Excelmacromastery
3 жыл бұрын
Thanks for watching!
You are always upto the recent trend.. thanks for sharing valuable knowledge 😊
@Excelmacromastery
3 жыл бұрын
You're welcome.
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
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
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
2 жыл бұрын
I use Excel VBA to automate web pages. But now I am stuck with the dead of Internet Explorer....
@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…
Very timely. I have been thinking about running Python instead of VBA. Thanks!
@Excelmacromastery
3 жыл бұрын
You're welcome.
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
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
3 жыл бұрын
You can debug Python code.
@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
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
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
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. :)
This is the best video I've seen on KZread on Py vs VBA
@Excelmacromastery
2 жыл бұрын
Thanks Fred
Great video. Thanks so much. What IDE are you using? The active 'help' looks great.
@Excelmacromastery
3 жыл бұрын
Visual Studio Code.
great vid - good info - well explained
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
2 жыл бұрын
I think they know python as snake rather than a programing language😁
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
3 жыл бұрын
Great suggestion!
@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
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
2 жыл бұрын
@@macedoniojr with power query in Excel this is not an issue
@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.
Absolutely great video.... You are the master in your area ....there is no 2nd to you
Thank for making this video you cleard my doubts towards VBA and python
@Excelmacromastery
3 жыл бұрын
You're welcome.
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
2 жыл бұрын
⁸
@ichbrauchmehrkaffee5785
2 жыл бұрын
Wise choice
Very interesting, I was wondering if I should use Python or VBA, now I have a better idea. Thank you Paul!
@Excelmacromastery
3 жыл бұрын
You are welcome!
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
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.
Man that was a killer video
This was immensely helpful in clarifying how to use python in excel
Great explanation, please upload python with excel manipulation more videos 👍👍
I would love to see your video where you teach Python!
@Excelmacromastery
3 жыл бұрын
I may do more in the future.
@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
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
3 жыл бұрын
@@Excelmacromastery Please do. Your explanation is superb.
@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.
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
3 жыл бұрын
Happy to help!
Splendid video Splendid effort to explain
Please start teaching us to Python... Thanks P.Kelly
thanks for the amazing video
Thank you for the excellent and pertinent information. Perhaps VBA can still be used kind of like pseudocode, before you write a Python script.
Brilliant many thanks
Not for malware. VBA is still really handy for executing code on unsuspecting victims via macros.
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!
Excellent information, how about a comparison of python vs typescript for excel?
@Excelmacromastery
3 жыл бұрын
It's a good idea. I'll keep it in mind.
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)
Would love a video series teaching python
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
3 жыл бұрын
Thanks for sharing Steven. I haven't used R so it was interesting to read your thoughts on R vs Python.
Awesome and simple video
@Excelmacromastery
3 жыл бұрын
Thanks a lot 😊
Thanks for this enlightning video
@Excelmacromastery
3 жыл бұрын
You're welcome.
Like your new DP :)
@Excelmacromastery
3 жыл бұрын
Thanks
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
10 ай бұрын
dream coming true...
I thought than after VBA I will go into the TypeScript direction, but now I should also consider Python.
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
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.
Thumbs up!
great info 👍.
@Excelmacromastery
3 жыл бұрын
Thanks.
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.
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
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.
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!👍🤟😎
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
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.
interesting Informations .Thanks.
@Excelmacromastery
3 жыл бұрын
You're welcome
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
3 жыл бұрын
Thanks for sharing Todd. You make a very good point.
@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
영어가 어려워 모두 이해하지 못했지만 좋은 정보를 주셔서 감사합니다!
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)
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
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.
Very very best information for me
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
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.
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.
You are good in python teaching too.
Excellent video
@Excelmacromastery
3 жыл бұрын
Thanks Gareth
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
3 жыл бұрын
I may do more python videos in the future.