New

State of Legacy Software 2027. 5 minutes.

Take the survey
← Back to the blogMigration

Refactor Excel Shadow IT

A workbook runs a real process and three people know how. Recover its rules, get the owner's sign-off, then rebuild it as an application you can verify.

November 24, 2026 · 7 min read

Somewhere in your company, a workbook decides something that matters. It calculates the monthly commissions, allocates a budget, prices a quote or plans next quarter’s capacity. A business expert built it years ago, one formula at a time, because the official tools were too slow or didn’t exist. It works. It is a piece that three people know how to play, and one of them is on leave in August.

That is shadow IT, and nobody chose it. It grew because the workbook solved a real problem on the day it was needed. The question is what happens when the process outgrows the file, or when the person who understands it leaves.

Why it works, and why it can’t last

Give the workbook credit first. It captured how the business really works, in the business’s own words, faster than any project could have. That knowledge is the asset. The file is only where it happens to be stored.

The risks are familiar to anyone who has opened one of these files.

  • Knowledge sits in a few heads and in formulas nobody can read in full.
  • Logic hides in macros, hidden sheets, hard-coded constants and cells someone overwrites by hand every month.
  • Copies multiply: “final”, “final_v2”, “final_v2_corrected”. Nobody can say which one is right.
  • There is no access control and no history of who changed a rate, or when.
  • Data moves by copy and paste between files and systems.
  • There are no tests, so a wrong formula looks the same as a right one.
  • A file passed around by email does not cope with ten users and a growing volume.

None of this means you should ban the workbook. It means the logic inside deserves a proper home.

1. Freeze a reference copy and map what it does

Start by stopping the file from moving. Take a read-only copy and name it the reference. Then map the process around it:

  • the inputs, and where each one comes from;
  • the outputs, and who relies on them;
  • the steps, including the manual ones;
  • who touches the file, how often, and what usually goes wrong.

Do this next to the person who runs the workbook, while they run it. What they do by hand is often the part nobody mentioned. Then keep a few real runs: the input data and the results the business accepted. You will need them later as reference cases.

2. Extract rules, not cells

The unit of work is a business rule that happens to be written as a formula.

Take an illustrative case, a commission workbook. A nested formula in one cell reads like code. Behind it sits a sentence an owner can approve or argue with: “The rate is 4% up to the first threshold and 6% above it, capped per person, and new hires are prorated for their first quarter.” Another rule lives in a macro that rounds amounts before exporting them. A third is a note in a hidden row.

Go through the workbook and write each rule in plain language, next to where it lives. Sort what you find into three piles: rules, workarounds and errors. The workarounds matter most. “If the total is negative, I type zero” is a rule the business has applied for years without ever stating it.

3. Let the owner decide

Put the list in front of the people who own the process, not only the person who built the file. For each rule they confirm it, correct it or drop it.

Expect surprises. Some rules are dead, kept alive by habit. Some were never intended and are plain mistakes that have been repeated every month. This is the cheapest moment you will ever get to fix them, because nothing has been built yet. A rule that is wrong in the workbook and wrong in the new application is twice as hard to find.

The decision belongs to the business. The workbook is not the reference. What the business meant to do is.

4. Decide what the application must do that the workbook can’t

A faithful copy of a workbook on a web page is not an improvement. The point of moving is what a file cannot give you. Write these requirements down next to the rules:

  • Several users at once, with roles: who can see, who can change, who approves.
  • A history of changes, so you can answer who changed a rate and when.
  • Data read from the source systems instead of pasted.
  • Rates and thresholds held as configuration that the business can update with an effective date, separate from the logic.
  • Errors that are caught and shown, not silently carried into a total.
  • Backups, monitoring and a named owner.

This is also what makes the result scalable and maintainable. Each rule has a place in the code, a test, and a link back to the sentence the owner approved. The next person does not need to ask who built it.

5. Build from the validated rules, and verify against them

Now someone writes code: your developers, a coding agent, or both. The approved rules are the brief. Give them to whoever builds, in full.

Then check the result against those same rules. Two checks complement each other. The first is a parallel run on the real cases you kept: the old workbook and the new application should give the same results on the same inputs. The second goes rule by rule. A parallel run only catches what your sample contains. It will miss the rule that applies to one case in two hundred if that case wasn’t in the sample.

Lyriks does the second check. The validated spec goes to your coding agent over MCP, with its rules. Lyriks then verifies the code rule by rule with a deterministic engine: same code, same spec, same verdict. Each gap goes back to whoever writes the code until every rule holds. The report sorts each rule as compliant, addition, omission or regression. The rounding the macro used to do before export shows up as an omission long before it shows up as a number that doesn’t match.

6. Retire the workbook on purpose

Plan the switch. Run the old workbook and the new application side by side for one full cycle, a month-end for example, and compare. When the business accepts the results, make the workbook read-only, archive it with its documentation and announce a date. Don’t leave both alive. Two sources of truth are worse than one shadow.

Train the users, and name who supports the application and who owns the rules.

Start with one workbook

Pick the one that hurts most: the one a single person runs, or the one a team dreads at month-end. Take one process and one cycle. That is enough to learn how many rules were hiding in it, how many the owner wants to change, and how long the path from an approved rule to verified code really takes.

If you want to see this on a case close to yours, book a demo and bring the workbook everyone is afraid to open. The Refactor and migrate page walks through the full round trip from legacy to verified new code.

Keep your software in tune

Start with one module. Lyriks recovers its spec, then verifies every change. All it needs is your repository.