Business Systems · ICUNI Consult
CleanUpCrew
Exploring how spreadsheet scenarios can remain understandable even when records are removed from a calculation.
The build story 5 minute read
CleanUpCrew: Explore a Spreadsheet Target Without Losing the Rows Behind It
At a glance
- Purpose
- Exploring how spreadsheet scenarios can remain understandable even when records are removed from a calculation.
- The build
- A target-total scenario selects a subset while retaining a verifiable kept/removed partition. The exported evidence pack makes the modelling decision reviewable instead of silently discarding source rows.
In this story
By Menelek Makonnen · ICUNI Consult
CleanUpCrew helps you explore a target-total scenario in a spreadsheet while keeping every source row accounted for. Import a workbook, choose a period and target, set the selection policy and review the proposed subset alongside the removed remainder. The original uploaded file stays untouched.
This is useful when a discussion needs a constrained sample or subset and someone will quite reasonably ask how it was formed. You need more than a number that happens to be pleasing. You need the included rows, the excluded rows and the rules that explain the choice.
I built CleanUpCrew to make that exercise inspectable. Deleting rows until a spreadsheet agrees with me would be quicker to implement, but I already possess enough ways to manufacture personal disappointment. The product models a scenario, preserves its explanation and makes clear that a scenario is not authorisation to rewrite an accounting ledger.
Start from a source table you can account for
CleanUpCrew reads the first workbook sheet and maps its fields into a common shape. It recognises column aliases for dates, receipt references, items, quantities and money fields. Invalid dates and non-finite numbers stop import with a source-row error instead of quietly joining the calculation.
Missing values follow explicit fallbacks. Money becomes integer minor units for comparison. Dates are normalised, with calendar checks that reject impossible rollovers. Each source row receives an identity incorporating its position and canonical values, so two rows that look the same can still be accounted for separately.
I wanted the transformation to have a stable starting point. “Original” here means the normalised parsed table: it does not preserve every workbook sheet, formula and style. The uploaded file itself remains untouched. A useful interface should explain what it retained before asking anyone to trust what it changed.
Explore the target and see where the fit stops
The operator chooses a period, target total and policy. One option preserves at least one row per date; a swap budget limits the search. The source fingerprint, target and versioned policy produce a deterministic seed and scenario identity.
That makes the same inputs and settings produce the same scenario. An unexplained rerun should not reshuffle the evidence because the random-number generator woke up with new ambitions.
Selection groups rows by date, starts with a proportional sample, then removes, adds and swaps rows to improve the target fit. It is a bounded heuristic. Date coverage can constrain the result, and a target may be unreachable. The interface records the difference instead of declaring victory because the total looks close enough from the doorway.
At or above the available source total, all rows remain. A zero target keeps none, making date coverage inapplicable. These edge cases need explicit meaning; a control is easier to reason about when its boundaries are part of the design.

Scenario workflow: normalise the source, set the target and policy, then review a reproducible kept/removed partition.
Give the next reader the subset and the explanation
The strongest part of CleanUpCrew is what happens after selection. The core checks unique identities, complete source coverage, unknown rows, repeated output rows and unchanged canonical values. It verifies that the original total equals kept plus removed and that the applicable date-coverage policy holds.
Target fit stays separate. A scenario can preserve every row correctly across the two sets and still miss the requested target. Partition integrity answers “did we account for the source?” It does not answer “did we discover the best possible subset?”
For the person presenting the result, this distinction gives an honest answer to two different questions. All source rows can be accounted for even when the requested target is out of reach. You can show the difference and explain the constraint, rather than let one green check imply the computer discovered the best possible selection.
The receipt records the algorithm/schema version, scenario identity, source fingerprint, seed, policy, checks, counts, totals and target difference. Restore Original View invalidates the current scenario and returns to the parsed source. A changed setting should invalidate an older result before it can be exported under new assumptions.

Evidence workflow: verify source accounting, review target difference and confirm an export containing the scenario and its supporting records.
How the browser keeps the exercise reproducible
I implemented CleanUpCrew with HTML, CSS and JavaScript, separating the reusable selection and verification core from the interface. SheetJS handles workbook import/export and Chart.js supplies summaries. The browser performs the reviewed transformations in memory; settings use local storage.
Its near-black surfaces, purple/cyan accents, restrained star identity and animated CSS light forms give the workbench a clear visual character. Tabs, paginated tables and a settings drawer keep attention on the source, scenario and evidence rather than an elaborate navigation system.
The implementation uses a compact noncryptographic fingerprint for reproducibility bookkeeping. It does not create tamper-proof provenance. It also loads libraries and fonts from external CDNs, so local processing is different from a fully offline distribution.

Bring the whole explanation to the discussion
CleanUpCrew is for someone who needs a useful spreadsheet scenario and wants to remain able to explain it. The target, policy, source, kept rows and remainder stay connected through the review and export.
Building it reinforced a rule I now care about: a result should make the next question easier to answer. If somebody asks where the other rows went, the software can show them. I would rather give a scenario an explanation than spend the meeting writing its alibi.
Back to the story’s beginning ↑Project details
A local spreadsheet modeller that selects subsets matching a target total, preserves the kept/removed partition and exports a reviewable evidence pack.
Design and technical decisions
A target-total scenario selects a subset while retaining a verifiable kept/removed partition. The exported evidence pack makes the modelling decision reviewable instead of silently discarding source rows.
Inside the workflow
A local spreadsheet modeller that selects subsets matching a target total, preserves the kept/removed partition and exports a reviewable evidence pack.
Have something in mind?
Bring the problem, the audience and what you want to make possible.
Discuss your project