VBA is commonly used to automate Excel with macros, add new user defined worksheet functions (UDFs) and react to Excel events.
Everything you would previously have done in Excel using VBA can be achieved with Python. Using Python as a VBA replacement has many benefits and is usually faster than VBA!
To write worksheet functions (UDFs) in Python instead of VBA, use PyXLL’s Worksheet Functions (UDFs).
One feature of Excel that makes VBA compelling is it’s integrated VBA editor (VBE). While Excel doesn’t have a fully integrated Python editor, it is possible to use your normal Python IDE alongside Excel to develop your Python Excel add-in.
Most Python IDEs have an integrated Python debugger which you can use to step though your Python code as it runs in Excel. See the blog post Debugging Your Python Excel Add-In for details of how to connect to Excel for most popular Python IDEs.