How to Make a Data Table in Google Sheets (One and Two Variable)
Google Sheets has no built-in What-If data table. Here are the three ways people actually do it, from fully manual to one keyboard shortcut.
Jake Bennatt
I work in google sheets and stuff. Built XLkeys to make my job easier. You should try it, its free.
Quick answer: Google Sheets does not have Excel’s Data Table feature (the one under Data → What-If Analysis, shortcut Alt A W T). There is no native menu item, no shortcut, and no official add-on from Google. If you want a one- or two-variable data table in Sheets, you have three real options: build a formula grid by hand, write Apps Script, or use a Chrome extension that adds the Excel feature. This post walks through all three.
What a Data Table Actually Does
In Excel, a data table takes one formula output (say, IRR or ending cash) and recalculates it across a range of input values. A one-variable table varies one assumption down a column. A two-variable table varies one assumption across the top row and another down the left column, filling in the grid — that’s the classic sensitivity table on the last page of every finance deck.
The reason it’s hard to replicate is that each cell in the grid has to re-run your whole model with different inputs. A normal formula can’t do that — it can only reference the model’s current state.
Option 1: The Manual Formula Grid
If your “model” is simple enough to express in a single formula, you can build the grid yourself. Put your row input values across the top, column input values down the side, and write one formula in the top-left cell of the grid that recomputes the output using those two values, with the right mix of absolute and relative references ($) so it fills correctly.
- Works well when the output is one self-contained formula, like a loan payment or a simple margin calc.
- Falls apart when the output depends on a real model — you’d have to collapse the entire model into one formula per cell.
- Every change to the model means rewriting the grid formula. This is where most people give up.
Option 2: Apps Script
You can write a Google Apps Script that loops over your input values, writes each one into the input cell, waits for recalculation, reads the output, and fills in the grid. It genuinely works, and it’s the closest to what Excel does under the hood.
- Slow: Sheets recalculates on every write, so a 10×10 grid means 100 full recalcs with API overhead on each.
- Fragile: move the input or output cell and the script silently breaks.
- You have to maintain code in every workbook that needs a table, or publish your own add-on.
Option 3: Add the Excel Feature With an Extension
This is the route I built XLKeys for. It’s a Chrome extension that adds Excel’s What-If tools to Google Sheets behind the same shortcuts Excel uses. For data tables, that’s Alt A W T — the exact sequence your hands already know.
- Press Alt, release, then type A, W, T in any Google Sheet.
- Pick the output cell (the formula you want to sensitize).
- Pick one or two input cells and the range of values for each.
- Run it — the populated sensitivity grid is written into your sheet, formatted and ready to share.
Because it drives your actual model — varying the real input cells and reading the real output — it works on any model, no matter how many tabs deep the logic goes. Re-run it after the model changes and the grid refreshes. Goal Seek works the same way (Alt A W G) if you need the reverse question: which input hits a target output.
Which Option Should You Use?
| Method | Best for | Limitations |
|---|---|---|
| Manual formula grid | Single-formula outputs (loan payments, unit economics) | Unusable for multi-tab models; grid formulas need rebuilding on every change |
| Apps Script | One-off automation if you like writing code | Slow, fragile, needs maintenance per workbook |
| XLKeys (Alt A W T) | Real models, repeated use, Excel muscle memory | Pro feature — 30-day free trial, no credit card |
If you build sensitivity tables more than once a quarter, install XLKeys and keep the Excel workflow — Alt A W T, pick your cells, done.
Related Google Sheets shortcuts
Make Google Sheets feel like Excel
Install XLKeys to use Excel-style shortcuts, Alt-key sequences, formula auditing, Goal Seek, Sensitivity Tables, and Workbook Health audits in Google Sheets.
Add XLKeys to Chrome