This Simple Spreadsheet Formula Is Way More Expensive Than Code

  • Spreadsheets are just code in disguise, but with worse readability and higher maintenance costs.

  • Writing and debugging formulas takes significantly more time than using AI-assisted code.

  • Once a formula gets too complex, it outlives its usefulness—often becoming an untouchable operational and security liability.

We think of spreadsheets as an alternative to code, but actually, spreadsheet formulas are code.

Formulas are not our natural spoken language; they are a “language” construct we have to learn, just like any coding language. Even in straightforward spreadsheets like forecasts, formulas quickly become as unintelligible as alphabet soup.

A Real Example

Here's a pricing and forecasting spreadsheet I built on the weekend for a startup:

It’s easy to look at this as complex, but it’s not. It’s one tab, whereas many of the ones I come across have 100+ tabs. And there are only two formulas:

  1. The first formula maps out the number of "entities" our system will use for customers joining in each month, based on the "10" and "120%" up top.

  2. The second formula calculates how much will be charged in each month, given the numbers created by the first formula. It uses the "tiers" up top.

Now, let’s contrast the time and cost of building and maintaining this in a spreadsheet versus in code.

In both cases, we get our answer.
In both cases, we use AI to turbocharge our efforts.

Why Code Is Cheaper to Build Than the Formula

It took me over three hours to get this working correctly. Most of my time was spent debugging the two formulas.

At one point, I built a whole new section of the spreadsheet just to debug parts of the formula before I figured out where the missing "$" was.

The same thing took me under five minutes to "write" using Claude and ChatGPT (I did it in both, in under five minutes). The numbers were the same, just in a CSV file, which I then had to format. Let’s add 10 minutes for formatting and say that the code took 15 minutes in total.

➡️ So, getting this done with well-commented code took just 10% of the time it took to build the same thing using two formulas.

One key reason is that it’s easier to read code than it is to read a formula.

Yes, code is longer and more verbose—but it’s also way easier to understand and document because each part of the problem is broken into pieces, instead of being garbled into one impressive (but hard-to-understand) "lump."

It’s also harder to isolate a problem in a formula, whereas with code, you can test each bit independently before recombining the working pieces.

Also, consider the per-hour cost of building this in code. For anything beyond a simple formula, it’s typically managers and team leads who have the skills and time to do this, not frontline workers.

Any junior developer who understands the purpose of this forecast can get AI to do it. You don’t need senior engineers to build a spreadsheet alternative for this type of solution.

Why Code Is Cheaper to Maintain (and Has a Longer Life) Than a Formula

Now let’s fast forward a week. Tell me there’s an issue with this formula. Show me the figure that’s wrong.

I guarantee you (because I’ve been there a hundred times) it’s going to take half an hour just to figure out how the formula works—before even starting the process of isolating the problem, applying a fix, and debugging it.

The same reasoning we used to show lower build costs for code applies to maintenance costs as well.

And the difference compounds:

  • The more time that passes, the more painful it gets.

  • The more people who come and go from the organisation, the worse it becomes.

  • Eventually, the formula becomes unmaintainable once it reaches a certain level of complexity.

In my experience, formulas over 30 characters don’t outlive their authors.

The original author might be able to dredge up the logic from dark, distant musings—but once they leave, your chances of modifying the formula without breaking it are slim. Even with AI.

Actually, this is an important point: I find AI far more effective in helping me with code than with formulas.

I’m not sure why this is, but I’ve tried multiple times now. AI just seems to add more value when working with a common programming language than when dealing with spreadsheet formulas.

My recent consulting experience surfaced at least 20 moderately or extremely complex spreadsheets that can no longer be changed for fear of breaking a core business process like billing or payroll.

In two cases, recent compliance changes required that the spreadsheet be updated—but no one was willing to take it on. For good reason.

Spreadsheets are amazing. We should keep using them for all sorts of needs.

But when formulas exceed 20-30 characters, it’s worth considering whether a spreadsheet is the right tool for the job.

 

Andrew Walker
Technology consulting for charities
https://www.linkedin.com/in/andrew-walker-the-impatient-futurist/

Did someone forward this email to you? Want your own subscription? Head over here and sign yourself right up!

Back issues available here.

Reply

or to participate.