# Cross-GeoSheet References (IMPORTRANGE)

Pull live data from one GeoSheet into another with IMPORTRANGE. Maintain a single source of truth, build roll-ups across teams, and govern who reads from your data.

GeoSheet supports **cross-GeoSheet references** through the `IMPORTRANGE` formula. Pull a range of cells from any GeoSheet you have access to into another sheet, and the values stay in sync as the source changes. This unlocks a single-source-of-truth pattern that's hard to express within a single document — master data lives once, and every other GeoSheet that needs it reads from there.

## Basic syntax

```
=IMPORTRANGE(source, range)
```

* **source** — the GeoSheet to pull from. Accepts either the **GeoSheet's name** (in quotes) or its **URL**:
  * `"Customers"` — by name
  * `"https://geosheet.app/s/abc123"` — by URL
* **range** — the cells you want, in quotes. Accepts:
  * A single cell: `"A1"`
  * A rectangle: `"A1:E200"`
  * A range on a specific tab: `"Summary!B2:D50"`

The formula goes in **the top-left cell of where you want the imported data to land**. Values spill from there to the right and down to fill the requested range.

```
=IMPORTRANGE("Customers", "A1:E200")
=IMPORTRANGE("Q3 Sales", "Summary!B2:D50")
=IMPORTRANGE("https://geosheet.app/s/abc123", "Inputs!B2")
```

## What you can import

Imported cells preserve their **type** — IMPORTRANGE isn't a string copy, it's a live reference. That means:

* **Numbers** stay numbers and can feed `SUM`, `AVERAGE`, math operators, etc.
* **Dates** stay dates and can be compared, formatted, or used in temporal formulas.
* **Spatial types** (POINT, MULTIPOINT, LINE, POLYGON, MULTIPOLYGON, COLLECTION) come through as their native types — you can immediately drop them on a map, build a `TRADEAREA`, or feed them to `GEOFENCE` without re-geocoding or re-parsing.
* **Formulas in the source resolve to their values** before being imported. The consumer sheet sees the *result*, not the formula text.

## How freshness works

While the consumer GeoSheet is open, IMPORTRANGE polls the source for changes in the background. Updates propagate without any manual sync — typically within about a minute of the source being edited.

You'll see two transient states on imported cells:

* `#PENDING` — first load is in flight, or the source is being re-checked. Resolves on its own.
* A short delay between an edit on the source and the new value showing up on the consumer — expected; that's the poll cadence.

If the consumer sheet is closed, no polling happens. When you reopen it, the next poll cycle catches the consumer up to the source.

## Seeing your connections

GeoSheet surfaces active IMPORTRANGE connections in a few places so you don't have to go hunting for them.

**Sheet tab icon** — any sheet tab with at least one IMPORTRANGE formula shows a small chain-link icon. Hover to see the formula count on that sheet.

**Status bar pill** — when the doc is actively importing data, a pill appears at the bottom: `2 imports · refreshed 4m ago`. Click it to open the References panel. The pill stays hidden when there's nothing to import.

**References panel** — open it via the **References** button in the toolbar, the status bar pill, or the sheet tab icon. It shows both directions in one place:

* **This doc imports from** — sources this doc has IMPORTRANGE formulas pointing at, with last sync time and connection status
* **This doc is imported by** — GeoSheets that are pulling data from this one, with revoke and restore controls

Opening the panel from a sheet tab icon defaults to filtering the imports list to that specific sheet. A toggle at the top lets you expand to all sheets in the doc.

## Source-side governance

From the **References** panel you can **revoke** any consumer at any time. This is a hard cut — the consumer's IMPORTRANGE cells flip to `#REF` immediately and the source values stop flowing through, so the consumer sheet will visibly break wherever those cells are used. Revoking a reference does **not** notify the consumer, so use this for cases like "this doc was shared too widely" or "that consumer is out of scope now," not as a routine permission tweak.

To restore a revoked reference, open the References panel and click **Restore** next to the revoked consumer. Live values come back within about a minute.

## Common patterns

**Master data.** Maintain a list of customers, locations, products, or KPIs in one GeoSheet. Every regional, team, or scenario sheet pulls a slice of that master with IMPORTRANGE. Edit once, propagate everywhere — no copy-paste between sheets.

**Roll-ups.** Each team owns its own GeoSheet (Eastern Region, Western Region, etc.). A parent dashboard pulls a few key cells from each with IMPORTRANGE. No shared editing, no merge conflicts, and the dashboard always shows live numbers.

**Reusable spatial datasets.** Maintain a curated set of geocoded points, service-area polygons, or reference geometries in one GeoSheet. Import them into any new analysis sheet — the spatial types arrive ready to map or feed into spatial formulas.

**Layered analysis.** Chain references: a "raw data" sheet feeds a "cleaned" sheet, which feeds a "summary" sheet. Each layer stays its own document, owned by whoever should own it, and changes propagate down the chain automatically.

## Limitations and gotchas

* **Read-only.** IMPORTRANGE is one-way. Editing imported cells in the consumer sheet doesn't write back to the source — the source is always the source of truth.
* **Permissions are inherited.** You can only IMPORTRANGE from a GeoSheet you have at least view access to. If your access is revoked at the GeoSheet level (e.g., the owner removes you from sharing), the imported cells flip to `#REF` on the next poll.
* **No partial picks within a row.** IMPORTRANGE pulls a contiguous rectangle. If you only want some columns, import the wider range and use formulas (or hide columns) to narrow the view in the consumer sheet.
* **Same workspace recommended.** Cross-workspace references work, but the consumer must have access to the source workspace (it doesn't grant access automatically).
* **Naming the source by name vs. URL.** Name-based references resolve at evaluation time — if you rename the source GeoSheet, name-based consumers find the new name automatically. URL-based references are stable through renames but break if the source is moved across workspaces. Pick whichever matches your stability needs.

## Troubleshooting

* **`#REF`** — most commonly means the source has been revoked from the **Referenced by** panel, or your access to the source GeoSheet was removed. Open the source and check the panel; or check your sharing settings.
* **`#PENDING` that doesn't resolve** — usually a first-load delay. If it persists past a minute, the source name or URL probably doesn't resolve; double-check the spelling or paste the URL fresh.
* **Old values lingering after you edited the source** — open the consumer sheet (polling only runs while it's open). If it's already open, give it about a minute. The cadence is steady but not instant.
* **Want to force a refresh** — re-edit the IMPORTRANGE formula (any small change, then Enter). That triggers an immediate sync without waiting for the next poll.