A budget split that respects every rule with Gemini
The struggle: You must split a fixed budget across ten lines, and every version you try breaks a limit someone set.
What you end up with: A split of your total across the lines that meets every minimum and maximum, with a check column that proves it.
Write the rules in a Sheet, then ask Gemini in Sheets to solve the budgeting problem with its optimization problem solver. You prove each rule yourself before showing anyone.
Tools: Gemini. Level: Pro. Time: 45 min.
Use it if
- You have a fixed total, lines with minimums and maximums, and rules that link them
- You have been fixing it by hand and keep breaking one limit
- You want to see two or three valid options, not one
Skip it if
- There are no hard limits to respect; a simple split is faster
- The rules are political and still unsettled
What you need first
- Gemini in Sheets on an eligible plan (Google AI Pro or Ultra, or Business or Enterprise Standard or Plus)
- A Google Sheet with your lines and the limits written down
The method
Write the rules as a table (Gemini: Sheets)
In a Google Sheet, make a table with one row per budget line and columns for minimum, maximum and what it should move toward (for example more for sales). Under it, write each linking rule in a sentence, such as line A must not exceed line B. Put the total in its own cell.
You get: A clear table of lines, limits and rules.
Tip: If you cannot say a rule in one sentence, the solver cannot use it.
Solve it (Gemini: Gemini in Sheets)
Click Ask Gemini at the top right and paste the prompt. Gemini uses the optimization problem solver for budgeting problems, then shows a result for you to review.
Prompt to copy:
Using the table above, split [total budget] across the lines in a new column. Each line must stay between its minimum and maximum. Follow these rules: [paste the rule sentences]. Maximise [objective]. If the rules cannot all be met, say which ones conflict instead of breaking one.
You get: A proposed split in a new column.
Tip: Ask for the objective in plain words, such as maximise the amount for marketing, so the goal is explicit.
Prove every rule (Gemini: Gemini in Sheets)
Add a check column with your own formulas: sum equals total, each line within limits, each linking rule true or false. Ask Gemini to write the formulas if you like, then test them with one number you change by hand.
Prompt to copy:
Add check columns for the proposed split: total equals [total budget], each line is between its minimum and maximum, and each of these rules holds: [rules]. Show TRUE or FALSE for each row and one overall result.
You get: A column that shows every rule passing or failing.
Tip: A check you wrote or read yourself is worth more than Gemini saying it worked.
Ask for alternatives (Gemini: Gemini in Sheets)
Change one rule, for example raise a maximum or drop a minimum, and ask for a second split next to the first. Compare the lines that moved and write down the trade off in a sentence.
Prompt to copy:
Create a second split in the next column under this changed rule: [new rule]. Then list the three lines whose amounts changed most between the two splits, with the numbers.
You get: Two valid splits and the trade off between them.
Tip: Keep options to two or three; more makes the decision harder.
Where this goes wrong
- The solver does what the rules say, not what makes sense. Read the result as a person who knows the business.
- If rules conflict it may stop or relax one; ask which rule it relaxed.
- This splits money by your rules. It is not tax or investment advice. Have a qualified person check this before you sign, file or send it.
- Keep bank account numbers out of the Sheet. Charts and answers in the side panel do not update, and chat history is lost on reload, so keep what you need in the Sheet.
Sources
- Docs Editors Help: Gemini in Google Sheets
- Google Workspace Updates: Build and edit complex spreadsheets with Gemini in Sheets
More like this
- Sort a year of bank lines into categories
- A polite late payment email ladder
- Your spreadsheets, explained and charted
Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.