Back to Census Bureau in Excel
SheetXAI logo
Census Bureau logo
Census Bureau · Excel Guide

Enrich a ZIP Code List with ACS Demographic Data in Excel

The Scenario

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

Your workbook has 200 target ZIP codes in the Sites tab, 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 try to download a 200-ZIP batch table
  • The interface times out on the bulk export
  • You download five smaller CSV files, open them in separate workbook tabs, and paste them together
  • You realize the column order is inconsistent across the five exports
  • You spend an hour realigning columns and writing VLOOKUPs
  • You walk into Thursday's meeting with 140 of 200 rows complete and no explanation ready.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook that knows the Census API, its variable codes, and its geographic formats.

Open the SheetXAI sidebar and type:

For every ZIP code in column A of the Sites tab, fetch ACS 5-year estimates for median household income, total population, and housing units 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, and writes the enriched values row by row into the workbook. Non-matching ZIPs get flagged in column E instead of silently returning blanks.

What You Get

A fully enriched workbook tab, 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 published ACS 5-year estimates. Your director can cite the vintage year in the footnotes without a second lookup.

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

What If the Data Is Not Quite Ready

Real geography lists have inconsistencies that break a batch query.

When the ZIP codes have inconsistent formatting

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

Normalize all ZIP codes in column A of the Sites tab 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 workbook (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. Flag any county FIPS that returns no data.

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 of the Sites tab. 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.

For each ZIP in column A of the Sites tab, fetch ACS 5-year median household income and housing units. Also fetch 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 three separate data pulls joined by VLOOKUP, 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 workbook 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 Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more