For 1.5 years of interesting spreadsheets and related tricks I’ve (largely) neglected to post about any. I’m among a billion voices, so for the most part adding to the noise seems useless. This time I found something worth spreading.
I’ve been pretty evangelic about Excel’s shiny recent plugins (their names start with ‘Power’), and recently learned something cool about Power Query. I’d known of the ability to dynamically load M code from a text file, which seemed interesting. It was only a couple days ago that I found out Power Query also allows defining reusable functions though. This was exciting to me because it would allow the kind of modular kind of coding I liked of Excel VBA — solve a problem once, make the solution into a new function, problem solved (permanently).
I then revisited Chris’s mentioned blog post, and found this thread on how to dynamically load code for such user-defined functions from a file. This combination seemed more than significant to me, as it would bring this modular coding to Power Query as well. Find yourself using the same three functions in a row a few times? Make it a new function and save some lines each time! Beats being stuck with nothing but those regular functions.
With this in mind, I externalized a couple functions I had / could find online (yeah mostly Chris Webb’s blog) into separate files, and put them into a Github repository so others could use them as well, and hopefully add new functions. Further explanation in there.