Python Forum

Full Version: Python vs VBA for Excel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As a business analyst, I've been using VBA with Excel and Access for a while now and can usually accomplish my goals with these tools alone. I recently started playing with Python and I can see it has some great features. Like VBA, the syntax is pretty simple to pick up. I'm watching as many videos and reading as many articles as I can on Python but all of them seem to fail to tell me WHY I should use this. It's outside of Excel, which seems inconvenient and I can't figure out where the end user comes in.

As an example: In my job I create a lot of interactive dashboards, fed by data from Excel sheets and Access databases. The end users enter a range of dates, for example, and VBA macros manipulate the data, run pivots, charts, etc. I understand this can be done in python as well, but where would an end user come in? Is python better suited for analyst who are running a lot of ad hoc reports to be completed and delivered without the requester running anything themselves?

I know there's a GUI for python, but then I assume I'd have to do python installations on client PCs and at this point excel and VBA seems easier. I want to like this, can someone help me see what I'm missing?
One big reason is that VBA only runs on other platforms using Microsoft software products like 'Office MAC OS X', MapPoint or Visio.

Quote:I assume I'd have to do python installations on client PCs
Python will run on just about any platform, and is already installed on most.
It can, and very often is embedded into the application, thus you do not have to worry about what's on client machine.
For web applications, all of the transient data, etc can (and should be) on the server, not on client.
A few reasons -
In Excel, looking at a spreadsheet you cannot tell what was entered as data from calculated values - results obscure the formulas, and it is work to uncover.
There are limits in Excel when it comes to Big Data. Britain found that out when compiling data about Covid-19 when suddenly it looked like cases had fallen off, but in fact they rolled off the sheet due to limitations on numbers of rows

Here is a podcast from Talk Python To Me, great podcast series despite the name. This discusses some of the issues Python solves in data analysis better than Excel

https://talkpython.fm/episodes/show/288/...-to-python
Python is considered a more efficient data analysis tool for complex calculations and large volumes of data. However, Excel is still more popular overall than Python, and it is used by a large number of people in financial analysis.

While Excel is not ideal for handling large volumes of data, it is a more convenient tool for organizations with small volumes of data that require simple calculations. Python, on the other hand, is more efficient than Excel when the organization handles large volumes of data that require automation to produce results within a short period.

To get more information you can go to Removed link (spam)

Regards,
Caleb