This playbook turns transactions containing refunds, transfers, and pending charges into an expense table you can recalculate. First standardize the rules and preserve uncertain items, then verify the totals with formulas instead of asking Gemini to judge whether the spending is “reasonable.”
This page is not financial, tax, or investment advice. Google’s official guidance warns that Gemini Apps responses should not be treated as professional advice. Have a qualified professional verify decisions involving debt, taxes, insurance, investments, or other major financial matters.
In plain language: Identify each transaction’s role before categorizing it
Section titled “In plain language: Identify each transaction’s role before categorizing it”Money moving in a transaction record does not necessarily represent new spending. A refund reduces the related category, a payment or transfer between your own accounts should not be counted again as spending, and a pending transaction is not a final amount. Determine the direction and status first, then categorize it.
Minimal example: Do not count a transfer twice
Section titled “Minimal example: Do not count a transfer twice”Starting material (synthetic):
date,description,amount_yuan,direction,status2026-10-12,Credit card payment,2000.00,transfer between accounts,posted2026-10-13,Greenleaf Market,286.40,expense,posted2026-10-15,Greenleaf Market refund,35.50,refund,postedPrompt:
First group the transactions as “expense,” “refund,” or “transfer between accounts,” then calculate net spending.Do not count the credit card payment again as a new purchase. Apply a refund only to a category with a clear connection.Show the calculation for each step. Mark any connection you cannot confirm as “Needs confirmation.”When the refund is known to be associated with the market purchase, net spending is 286.40 - 35.50 = 250.90 yuan, not 2,250.90 yuan.
Full example: Synthetic transactions
Section titled “Full example: Synthetic transactions”Starting material
Section titled “Starting material”The following merchants and amounts are fictional. The records include a suspected duplicate, a shared-expense reimbursement, a transfer between accounts, and an expense with an unknown purpose.
row,date,description,amount_yuan,direction,status,note2,2026-10-01,Maple Court Property,3200.00,expense,posted,housing3,2026-10-03,Greenleaf Market,286.40,expense,posted,mixed groceries and household supplies4,2026-10-04,Crosstown Transit,120.00,expense,posted,transportation5,2026-10-05,CloudSail Video,28.00,expense,pending,possibly the same transaction as row 66,2026-10-06,CloudSail Video,28.00,expense,posted,possibly the same transaction as row 57,2026-10-08,Greenleaf Market refund,35.50,refund,posted,associated with row 38,2026-10-10,Shared purchase reimbursement,600.00,inflow,posted,returned by a household member9,2026-10-12,Credit card payment,2000.00,transfer between accounts,posted,between two accounts owned by the same person10,2026-10-15,ClearSpring Pharmacy,86.30,expense,posted,household essentials11,2026-10-16,Electric Utility,172.65,expense,posted,utilities12,2026-10-18,Hawthorn Books,98.00,expense,posted,learning13,2026-10-20,Payment platform merchant,199.00,expense,posted,purpose unknownSynthetic category budgets: 3,200 yuan for housing, 1,200 yuan for groceries and household supplies, 400 yuan for transportation, 350 yuan for utilities, 100 yuan for subscriptions, 300 yuan for household essentials, and 200 yuan for learning. The records cover only October 1–20 and exclude cash, so they cannot establish the balance for the full month.
Full prompt
Section titled “Full prompt”Organize household expenses using only the synthetic CSV I provide. Do not identify merchants online, judge the value of a real household's spending, or offer investment, lending, or tax advice.
Phase 1: Standardize without calculating conclusions1. Check whether the row count, dates, amounts, directions, statuses, and notes are complete.2. Output a standardized table: row | date | original description | amount | direction | status | provisional category | uncertainty.3. Preserve the original amounts. Do not turn refunds into negative numbers or delete suspected duplicate rows.4. Do not force mixed groceries and household supplies, unknown purposes, or similar items into narrower categories.
Phase 2: Calculate using these rules- Include “posted + expense” in gross spending.- Apply a posted refund with a clear connection to the corresponding category.- Exclude inflows and transfers between accounts from categorized spending, and list them separately.- Exclude pending transactions from posted totals and place them under “Possible balance impact.”- Flag suspected duplicates only. Do not delete them without reconciliation evidence.- Put row 13, whose purpose is unknown, in “Uncategorized.” Do not guess a category.
Output:1. An explanation of the accounting rules.2. A category table: category | posted expenses | refunds | net | budget | budget variance (budget - net) | included rows. Enter “Needs confirmation” for the budget and variance of Uncategorized.3. Itemized calculations for gross spending, total refunds, and net spending.4. A table of inflows and transfers between accounts excluded from spending.5. A list of pending items, suspected duplicates, mixed categories, and unknown purposes.6. Because the records cover only October 1–20 and exclude cash, list the conclusions that cannot be drawn.
Final audit: For each category total, list the rows and calculation used. If the sum of the category table differs from net spending, stop before giving a conclusion and identify the difference.Expected output
Section titled “Expected output”Posted gross spending should be 4,190.35 yuan, refunds should total 35.50 yuan, and net spending should be 4,154.85 yuan. The 600.00 yuan inflow and 2,000.00 yuan transfer between accounts should not enter categorized spending. The pending 28.00 yuan in row 5 should not enter posted spending either.
Category net amounts should be: housing, 3,200.00 yuan; groceries and household supplies, 250.90 yuan; transportation, 120.00 yuan; subscriptions, 28.00 yuan; household essentials, 86.30 yuan; utilities, 172.65 yuan; learning, 98.00 yuan; and Uncategorized, 199.00 yuan. Because the time range and payment channels are incomplete, these records cannot establish that the household will stay within budget for the full month.
Counterexample and rewrite
Section titled “Counterexample and rewrite”Incorrect conclusion: “This month’s spending was 6,754.85 yuan, including two charges for the video subscription and 600 yuan in subsidy income from a household member.”
This statement counts the credit card payment twice, declares a duplicate charge without evidence, and mischaracterizes the shared-purchase reimbursement.
Safer rewrite: “Posted net spending from October 1–20 was 4,154.85 yuan. A pending 28 yuan transaction may correspond to a posted transaction and must be checked against the statement. List the 600 yuan shared-purchase reimbursement and the 2,000 yuan transfer between accounts separately, and exclude both from categorized spending.”
Verification checklist
Section titled “Verification checklist”- All 12 original rows are preserved, with no changes to row numbers, dates, or amounts;
- Posted transactions, pending transactions, refunds, inflows, and transfers between accounts use different rules;
- Gross spending of
4,190.35, refunds of35.50, and net spending of4,154.85have been independently recalculated with formulas; - The category net amounts sum to net spending, and every amount can be traced to a row;
- Row 5 is excluded from the posted total and has not been deleted without evidence;
- Row 9 is not counted again as spending, and row 8 is not mislabeled as wages or investment income;
- Mixed purchases and unknown purposes remain visible instead of being force-fitted for a chart;
- The conclusion states that the records cover only October 1–20 and exclude cash, and it does not extrapolate to the full month;
- Final figures are used only after every item has been checked against the original bank or payment-platform statement.
Failure recovery and safety boundaries
Section titled “Failure recovery and safety boundaries”- Totals do not match: Stop the analysis and output only each calculation and its participating rows. Recalculate independently in a spreadsheet with
SUM. - Refund assigned to the wrong category: If there is no clear connection, put it under “Unmatched refunds” instead of allocating it evenly.
- Suspected duplicate: Compare the transaction status, posting date, and statement identifier. Preserve both until confirmed; do not delete either one or initiate a dispute on your own.
- Categories are too granular: Return to a small set of stable categories and preserve the original descriptions.
- Data is incomplete: Add the missing date range, accounts, and cash records before regenerating the analysis. Do not extrapolate partial transactions to the full month.
- Unfamiliar transaction found: Do not act on Gemini’s guess about a merchant name. Verify it directly through the bank’s or payment platform’s official channel.
- Real financial data: Before uploading, remove names, account and card numbers, addresses, order numbers, and personal details in notes. Get household members’ consent before sharing.
As of 2026-11-24, official guidance confirms that Gemini Apps can attach and analyze spreadsheets. Its guidance on creating, enlarging, and customizing charts from attached spreadsheets explicitly applies to the Gemini web app. Totals must still be checked against the original transactions and formulas. The Privacy Hub explains that prompts and files are processed, so minimize what you send.
Next: See Analyze a spreadsheet to check formulas and anomalies, review Privacy and data controls before organizing real materials, and use Verify the answer to check every item before making any financial decision.