In general, if you perform complex matrix calculations you can do with numpy and scipy, python will be faster than VBA. In other cases, VBA is faster. In python, you can also use Numba, which adds a bit of complexity to the code, but it helps generating compiled code and handles running it in the GPU.
In summary, if your focus is on automating and customizing Microsoft Office applications, then VBA is likely the better choice. However, if you need a more general-purpose programming language that can be used for a variety of tasks, then Python may be the better option.
While there are advantages to using both Excel and Python, “Python is just a little more robust,” says Ada Morse, Codecademy Curriculum Developer in Data Science.
Can Python Replace Excel You can replace Excel with Python, by using the Pandas library which allows you to deal with DataFrames in a similar, but more powerful, way as what you would do with Excel tables.
Python also offers greater efficiency and scalability. It's faster than Excel for data pipelines, automation and calculating complex equations and algorithms.
Excel is the perfect tool for someone who dabbles with data or just wants to keep track of schedule but doesn't necessarily want to go too deep into data analytics. Python, on the other hand, has a fairly steep learning curve if you have little or no programming experience.