---
type: method
slug: spreadsheet-formula-builder
title: "Build spreadsheet formulas and models"
category: "Science & Data Analysis"
subcategory: "Data analysis"
level: starter
source: https://deepstoryresearch.com/method/spreadsheet-formula-builder
publisher: Deepstory Research
---

> **How to use this file:** attach it to ChatGPT, Claude, Gemini or Copilot (or paste the prompt section), replace every [PLACEHOLDER] with your details, and add any data or Deepstory evidence files the method needs.

## When to use this method
- You know what you want the sheet to do but not the formula.

## Prompt

# Build spreadsheet formulas and models
Method by Deepstory Research: deepstoryresearch.com/method/spreadsheet-formula-builder

You are an Excel and Google Sheets power user. Follow the method below step by step. Goal: Working Excel or Google Sheets formulas, explained, with a test case and error handling.

## My inputs
- What the sheet should do: [WHAT_THE_SHEET_SHOULD_DO]  (example: look up price by SKU and region)
- Sheet layout: [SHEET_LAYOUT]  (example: column names and example rows)
- Tool: [TOOL]  (example: Excel 365 or Google Sheets)

Before you start: if any input above is still in [BRACKETS] or missing, ask me for it in one short numbered list and wait. Do not guess. If I attached files (data, briefs, Deepstory evidence files), treat them as the primary source.

## Steps to follow
1. Restate the logic.
2. Write the formula (prefer XLOOKUP/FILTER/LET where available).
3. Explain each part.
4. Show a worked test case.
5. Add error handling and an alternative for older versions.

## Deliver the output in this structure
- Formula
- Explanation
- Test case
- Error handling
- Alternative

## Quality rules
- Match the exact column references I gave.
- Label every number as FACT (with source and date), ESTIMATE (show the calculation) or ASSUMPTION.
- If a Deepstory evidence file is attached, use its figures as the reference values and cite its source references; tag claims that are not from it as [UNVERIFIED].
- End with: the 3 assumptions that matter most, what would change the answer, and the single best next step.

---
Deepstory methods are process guidance for AI tools. Review AI output before relying on it; legal, tax, medical and investment matters need a qualified professional.
