Business reports and charts on a desk
    Back to Case Studies

    Fixing a Tracker Script That Moved Rows and Zeroed the Counts

    A healthcare software company tracks every new subscriber in a shared Google Sheet, and the owner checks the active count at the top. While adding new members, I noticed rows jumping to the top of the sheet and the counts dropping to zero. I traced it to a script running behind the sheet, fixed it without replacing the file, and checked the numbers against the payments system.

    Google SheetsTroubleshootingData Accuracy
    Valentina, founder of Rellatech

    Valentina Akpan: Founder of Rellatech, providing administrative and operations support to executives, founders, business owners and teams. Her background combines technical support, customer success, administration and operations.

    The Starting Point

    The tracker is updated every weekday, one row per subscriber, grouped as monthly and annual members, then trial users, paused and cancelled accounts. Three formulas at the top count each group.

    Every time someone added a member or changed a status, the two paused accounts jumped to the top of the list. Once, a new name landed on another member's row because the rows moved while I was typing. The counts at the top also kept changing on their own, and at one point the active count read 0 when there were 60 active members.

    What I Did

    I undid each change one step at a time and saw that the rows moved straight after an edit, even when I had only typed a name. That meant something was reacting to edits, so I checked the sheet for scripts and found one that re-sorts the rows whenever a name or status changes.

    Reading the script showed two faults. It sorted by statuses called "Active", "Trialing" and "Paused", but the sheet uses "Monthly", "Annual" and "Trialing / beta users". Only "Paused" matched, so the paused rows were ranked first and moved to the top on every edit. It also rewrote the three count formulas after each edit to count "Active" and "Trialing", which no row uses, so the totals fell to 0.

    I corrected the script in place so it groups by the statuses the sheet uses, keeps a newly added row where it was added until it has a status, and writes count formulas that match the data. I also fixed the count ranges, which had shifted every time a row was inserted above them.

    I did not download and re-upload the sheet. The owner shares it by link and checks it daily, so the fix went into the same file.

    I then checked the tracker against the payments system: 61 active members, 32 monthly and 29 annual, 7 on trial and 2 paused, matching the sheet.

    What Went Into the Work

    Found the cause

    Traced the moving rows and zeroed counts to a script that runs on every edit.

    Corrected the sorting

    Groups rows by the statuses the sheet uses, so paused accounts stay at the bottom.

    New rows stay put

    A new member row no longer jumps away while it is being filled in.

    Counts that hold

    The three totals count the right statuses and no longer break when rows are added.

    Checked against payments

    Active, trial and paused counts matched the payments records.

    Same file, same link

    Fixed in place, so sharing, formatting and history were kept.

    Why It Matters

    The owner uses the active count to track growth against a subscriber cap, so a count that silently drops to 0 or rows that move under someone's cursor lead to wrong numbers and overwritten records.

    Fixing the script, rather than working around it each day, means anyone on the team can add a member without rows moving or totals breaking.

    Tools and Skills Used

    Google SheetsGoogle Apps ScriptPayments records

    Spreadsheet troubleshooting, reading and fixing Apps Script, formula repair and checking data against the source system.

    Who This Is For

    This case study is worth reading if you are:

    • ●A team whose shared tracker keeps changing in ways nobody can explain.
    • ●A spreadsheet with an old script behind it that no one remembers setting up.
    • ●Anyone who needs the numbers in a report to match the system they come from.

    Need help with similar work?

    Tell me which spreadsheet is giving you numbers you do not trust. I find what is changing it and fix it in the same file.

    Book a free call