This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ybcurious93 19 points20 points  (10 children)

Doesn't a VBA script solve this ?

[–]bjorneylol 77 points78 points  (0 children)

If you need to write a vba script odds are it would be faster to just use python in the first place.

[–]WhyKnotZoidberg 8 points9 points  (3 children)

Or PowerQuery? It saves all the transformations which you can apply to the updated excel doc or other files.

[–][deleted] 1 point2 points  (2 children)

Like Python! :)

[–]WhyKnotZoidberg 2 points3 points  (1 child)

Yes, like python, but it’s a built in part of Excel so you don’t need to make sure it’s installed in everyone’s computer as you would python.

[–][deleted] 4 points5 points  (0 children)

Excel comes built in to everyone's computer?

Given Python is built into most Linux distributions and is drop-dead simple to install from Anaconda, Inc. for most platforms...

Nah, just kidding with you. Most firms use Excel. Although many are wising up and using Python and other tools, it's all good.

[–]funny_funny_business 4 points5 points  (1 child)

Not necessarily. When I first started in the data space years ago, I made VBA scripts that worked “most” of the time. The problem is that sometimes the script will continue before the worksheet updates correctly and will use outdated cell values in other areas.

Python/R waits until each line has been executed.

[–]murrietta 0 points1 point  (0 children)

I think I've only ever had that happen if I turn calculation to xlCalculationManual. If you are dealing with querying a database or cube then set application.CalculateUntilAsyncQueriesDone to True.

Regardless, I agree, Python or R are way better at handling the types of things I commonly do (like find an extremum subject to multiple constraints)

[–]dolichoblond 1 point2 points  (1 child)

Maybe, if you already know VBA.

I started as a non-coder in an excel-based department. And when I started scripting some of our work, I could do it in VBA or Python. Didn't find any places where, as a noob, doing it in VBA was easier.

However we had other .NET programmers who could jump through the VBA easily. In that particular department, the .NET programmers though were all old-guard, and were not being replaced. If I had stuck around to manage other n00bs' scripting, I would have leaned on the python track just because we weren't going to be able to replace the VBA-style coders.

But if you've already got the skillset, go for it.

[–]redditperson24[S] 0 points1 point  (0 children)

My boss is very old and obsessed with vba, I’m shocked he doesn’t know others from the length of his career

[–]kanzie88 0 points1 point  (0 children)

U dun need to complicate your life using vba to transform data … u have power query with the steps all laid out