I'm using Lambda functions as a sort of poor man's version control. I've long awaited this (Lambda just became available on Excel for the web for me two weeks ago) and it's already paid off.
The context is like this. We have multiple workbooks with a uniform design that users manually update throughout the day. The workbooks include fairly complex formulas and must update in real-time, which excludes other options like Power Query or scripting. And we've recently transitioned to Excel for the web for business reasons (licensing, cross platform support, and quick connections to our BI software), which put an end to the VBA User Defined Functions we'd long used for this purpose.
Transitioning to Excel for the web was great for everyone else but dark days for me, in charge of maintaining the formulas. There were many drawbacks to translating our VBA UDFs into Excel formulas.
Our formulas change slowly, maybe a few times a year when business definitions or needs change. Unlike updating a single UDF, this required updating column formulas in each workbook in Excel for the web. Our Excel formulas also couldn't easily be "hidden" from users for a number of reasons. Best we could do was some hidden columns. So code was partially exposed and users could break formulas by editing where they shouldn't. And finally, the Excel formula bar is a weak option in the modern world for writing and storing code. So it's been an inconvenient few months.
Lambda functions fix every problem. I can write and store code in the Advanced Formula Environment which has respectable IntelliSense, linting, and formatting. The code isn't exposed on the worksheets users are editing. And my personal favorite, I'll never need to update column formulas across multiple workbooks again. I just update the AFE and deploy to other workbooks by importing a gist or copy/pasting.
As a future improvement, more git integration would be fantastic. I'd love to be able to have multiple workbooks pull the same gist, or from a last/stored gist all in one go. I guess a good VBA script could do this for me now just by updating named range formulas, ironically.
It's already great though, and just in time! In the two weeks since I've been able to jump on this, I already needed to update formulas and the experience was such a relief compared to updating column formulas.
This is definitely my preferred way to get UDFs shared across workbooks, across platforms, or on the web now. (The JavaScript options are a hassle and still sort of a mess IMO) Wholly recommend checking it out, and big thanks to the teams that brought us Lambdas and the Advanced Formula Environment.
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/excel/comme...