Back to Census Bureau in Google Sheets
SheetXAI logo
Census Bureau logo
Census Bureau · Google Sheets Guide

Enrich a ZIP Code List with ACS Demographic Data in Google Sheets

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a commercial real estate analyst. It is Tuesday at 4 PM and the portfolio review is Thursday morning.

Your sheet has 200 target ZIP codes in column A. Before the meeting you need median household income, total population, and housing-unit count from the ACS 5-year dataset filled into columns B, C, and D. Your director wants to rank markets by income quartile before the slide deck goes to the partners.

The bad version of the next two days:

  • You open data.census.gov and build a table query for ZIP codes
  • The interface times out on the 200-row export
  • You download five smaller CSV files, paste them together, realign the columns
  • You manually convert ZIP code strings to match the Census format
  • You realize the downloaded table uses a different variable name than the column your director asked for
  • You walk into Thursday's meeting with 140 of 200 rows complete and no time to explain why.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that knows the Census API, its variable codes, and its geographic formats, so you do not have to look any of it up.

Open the SheetXAI sidebar and type:

For every ZIP code in column A, fetch ACS 5-year estimates for median household income (B19013_001E), total population (B01001_001E), and housing units (B25001_001E) from the Census Bureau API and write the results into columns B, C, and D. Flag any ZIP codes that return no match in column E.

SheetXAI calls the Census ACS endpoint for each ZIP, handles the variable codes, parses the responses, and writes the enriched values row by row. Non-matching ZIPs get flagged in column E instead of silently returning blanks.

What You Get

A fully enriched sheet, 200 rows deep:

  • Column B — median household income per ZIP
  • Column C — total population per ZIP
  • Column D — housing-unit count per ZIP
  • Column E — "NO MATCH" flag for any ZIP the ACS does not cover

The values come directly from the published ACS 5-year estimates, the same source the Census Bureau uses for official statistics. Your director can cite the vintage year in the footnotes without a second lookup.

Want to add a quartile rank? Tell SheetXAI to add a column F with the income quartile for each ZIP based on the values already in column B. It does it in the same session.

What If the Data Is Not Quite Ready

Real geography lists have inconsistencies. SheetXAI handles them inline.

When the ZIP codes have inconsistent formatting

Some rows have leading zeros, some do not. ZIP 07030 shows up as 7030 in rows from the CRM export.

Normalize all ZIP codes in column A to five-digit strings with leading zeros. Then fetch ACS 5-year estimates for median household income, total population, and housing units for each ZIP and write results into columns B, C, and D.

When you need county-level data instead of ZIP-level

Your director decides mid-project that county is the right granularity for the income ranking.

For each county FIPS code in my sheet (state in column A, county in column B), pull ACS 5-year median household income, poverty rate, and median age — write results into columns C, D, and E. If a county FIPS returns no data, write "NO DATA" in the corresponding row.

When you only want markets above a population threshold

You want to drop any ZIP below 10,000 people from the ranking before the meeting.

Fetch ACS 5-year total population for each ZIP in column A. Then filter to ZIPs with population over 10,000 and write only those rows — with income and housing units — into a new tab called Qualified Markets.

When you need income, housing, and industry data in one pass

Your director asks for a combined score: income quartile plus housing-unit density plus the number of retail establishments. That last number is County Business Patterns, not ACS.

For each ZIP in column A, fetch ACS 5-year median household income and housing units. Also fetch the 2021 County Business Patterns establishment count for NAICS 44-45 (retail trade) at the ZIP level. Write all three into columns B, C, and D. Rank each ZIP by a composite score (income quartile + housing-unit density quartile + retail establishment quartile) and write the score into column E.

The pattern: instead of making three separate data pulls and joining them manually, you ask for all three in one prompt and let SheetXAI handle the joins.

Try It

Get the 7-day free trial of SheetXAI and open any sheet with a list of ZIP codes or county FIPS codes, then ask it to enrich the rows with Census ACS data. The Census Bureau integration is included in every SheetXAI plan. For related workflows, see how to pull County Business Patterns by NAICS code or the Census Bureau in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more