Tools / troubleshooting
Gemini in Google Sheets Gives a Vague Answer? Check the Range First
Cihan's view: Put the relevant rows in the sheet, pass the exact range to the AI function, and check every generated status against the source before an approval decision.
Gemini in Google Sheets can produce a tidy answer that misses the row you needed. The problem may not be the wording of your prompt. The function may only have the range you gave it, while the rest of the context sits somewhere else in the workbook or in Drive.
This guide uses the Google Sheets AI function to create a small approval review note from a fictional queue. You will make the input boundary visible, generate one text result per row, and check the result before anybody approves or rejects a request.
Evidence label: documentation-based and illustrative. Google documents the =AI() and =Gemini() functions, the optional range argument, the need to place context in the current sheet, and the function’s text-only output. The queue, prompts, outputs, and checks below are fictional. No Gemini run or personal test is claimed.
The work problem
A manager has five requests waiting for approval. The sheet contains the request details, but a separate note contains the approval rules. A prompt such as “Which requests are ready?” leaves too much unstated:
- Which rows should Gemini inspect?
- What counts as ready?
- Should an unknown field become “ready” or “blocked”?
- Where should the reviewer look when the generated note is wrong?
The useful artifact is not an approval. It is a review note with a status, the missing item, and the source row that a person can check.
What you need
- Google Sheets on a computer.
- An eligible Google Workspace or Google AI plan with the AI function available. Google says access depends on the plan and account settings.
- A blank practice spreadsheet. Use the fictional rows below, not confidential requests.
- A human reviewer who can decide whether a request is actually ready.
Google says the AI function works with =AI() or =Gemini(). The function can use an optional range argument, but it does not automatically read your entire spreadsheet or other files in Drive. If the function is unavailable, stop at the access check. Changing the prompt will not create access.
1. Create the complete fictional queue
Open a blank Google Sheet. In cell A1, paste this tab-separated block:
request_id team request amount_usd owner policy_check evidence_link
AR-101 Operations Replace damaged barcode scanner 480 Mina Passed drive://ops/AR-101-invoice
AR-102 Marketing Sponsor a local event 2400 Leo Missing drive://mkt/AR-102-quote
AR-103 Sales Renew demo software 900 Aylin Passed
AR-104 Finance Buy a second monitor 310 Kerem Passed drive://fin/AR-104-quote
AR-105 Support Extend contractor hours 1800 Derya Unclear drive://sup/AR-105-note
The table has deliberately awkward cases. AR-102 has a missing policy check. AR-103 has no evidence link. AR-105 has an unclear policy check. Those are not invitations to guess.
Add a second small section below the table or on another tab called Rules. Paste this text into A1:
Approval review rules
A request is ready for human approval only when the policy_check is Passed and evidence_link is present.
If either field is missing, label the request Blocked and name the missing field.
If policy_check is Unclear, label the request Needs policy check.
Do not infer an approval, reject a request, or repair a link.
Keep the rules in the same spreadsheet if you want to include them in the function’s range. A separate Drive document is outside the function’s automatic context.
2. Try the narrow, reproducible formula
In H1, add the heading review_note. In H2, enter this formula:
=AI("Review this approval row using the rules below. Return exactly one line in this format: STATUS | missing item or Ready | request ID. Use only the supplied row and the rules. STATUS must be READY, BLOCKED, or NEEDS POLICY CHECK. Never infer approval. Rules: A request is READY only when policy_check is Passed and evidence_link is present. If evidence_link is blank, say evidence_link missing. If policy_check is Missing, say policy_check missing. If policy_check is Unclear, use NEEDS POLICY CHECK. Row:",A2:G2)
The important part is A2:G2. It gives the function the current row, including the fields that decide the status. The formula asks for text only. It does not edit the request, create an approval, or follow the evidence_link.
Select H2 and choose Generate and Insert. Google documents this step for AI functions. If your account uses the Insert > Function > AI path, use that instead. Do not assume the formula has generated a result merely because it is visible in the cell.
Copy the formula down to H6, then generate the selected AI cells. If your interface offers an AI column for the table, you can use it instead, but keep the same input boundary and output format.
3. Make the expected artifact visible
Your generated text may differ slightly. The following is an illustrative output that satisfies the prompt and the source rows:
AR-101: READY | Ready | AR-101
AR-102: BLOCKED | policy_check missing | AR-102
AR-103: BLOCKED | evidence_link missing | AR-103
AR-104: READY | Ready | AR-104
AR-105: NEEDS POLICY CHECK | policy_check unclear | AR-105
Treat this as an acceptance example, not as a claimed Gemini response. The source rows support two READY labels, two blocked or unresolved rows, and one missing evidence link. A person still decides what to do with each request.
If you want a compact review card, add these headings in J1:M1:
request_id generated_status missing_item human_decision
Copy the request ID and status into that card only after checking the generated note against columns A:G. For AR-102, the human decision might be Ask owner for policy check. That decision is an example of a review outcome, not something Gemini is allowed to make from the rule text.
4. Run the acceptance checks
Check the artifact row by row before sharing it.
- Coverage: There are five source request IDs and five review notes. No row is silently skipped.
- Identity: Each note contains the request ID from column A. A note with the wrong ID fails.
- Rule match: READY appears only where
policy_checkis Passed andevidence_linkis present. That means AR-101 and AR-104 in this sample. - Missing fields: AR-102 names the missing policy check. AR-103 names the missing evidence link. AR-105 remains a policy question.
- No invented action: The notes do not say approved, rejected, paid, or sent. Those are human actions outside this exercise.
- Source boundary: The formula refers to A2:G2, not the whole workbook. If you change the row, decide when to regenerate the output. Google notes that changes to data referenced in a prompt do not automatically give you a refresh prompt.
The decision is whether the review note is ready for a human to inspect. It is not permission to approve a request.
If the answer is vague or wrong
The function says it cannot see the rules. Put the rules in the same sheet and include them in the supplied range or prompt. The AI function does not automatically read another Drive file.
The cell says the AI function is unavailable. Check the account plan, administrator settings, language settings, or Workspace Experiments access. Stop there until the feature is available.
The result invents a missing link or calls a request approved. Regenerate with the exact row range and the explicit rule against guessing. Then compare the output with the source. If it still fails, leave the status unresolved and use a manual note.
Only some rows generated. Select the remaining AI cells and generate them separately. Google documents limits on how many selected AI-function cells can be generated at once.
You changed the source row. Treat the old result as stale. Refresh or regenerate it, then rerun the acceptance checks. Do not overwrite the source data to make the note look correct.
The decision
USE this pattern for a small, reviewable queue when the deciding fields are in the sheet and a person checks every result.
SKIP it for automatic approvals, confidential data your policy does not permit in the selected account, or queues where the real rules live in an unprovided document.
The range is part of the instruction. If Gemini cannot see the field that decides the outcome, it cannot reliably review the outcome.
Sources
- Google, Use the AI function in Google Sheets, for syntax, range arguments, generation controls, limitations, and access checks.
- Google, Collaborate with Gemini in Google Sheets, for the desktop Gemini surface, table context, and feature availability.
Want one practical workflow like this each week? Get the Weekly Verdict.