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

Pull County Business Patterns by NAICS Code into Excel

The Scenario

You are a franchise development manager at a restaurant chain. You have 50 candidate counties in an Excel workbook and a board presentation in ten days.

Before the board meeting you need two numbers for each county: the number of NAICS 722511 (full-service restaurant) establishments and total employees. That is your competitive density metric. The lowest-density counties per capita go to the top of the expansion list.

The bad version:

  • You search for County Business Patterns on the Census website
  • You realize data.census.gov does not let you batch-query 50 counties in one export
  • You download 50 separate county tables across multiple browser sessions
  • You paste them into the workbook and discover three of them have a different column order
  • You spend a morning reconciling the columns with Power Query
  • The board meeting is in two days and you are still on county 38.

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 County Business Patterns dataset and its API structure.

Open the SheetXAI sidebar and type:

For each county in my workbook (state FIPS in column A, county FIPS in column B), pull 2021 County Business Patterns data for NAICS 722511 — establishments and total employees — into columns C and D.

SheetXAI calls the Census County Business Patterns API for all 50 counties, maps the establishment and employment fields, and writes the results into the workbook. Counties that return no data for that NAICS get flagged rather than left blank.

What You Get

A clean enriched workbook, all 50 rows filled:

  • Column C — establishment count for NAICS 722511 per county
  • Column D — total employment for NAICS 722511 per county

These are the same CBP numbers used in commercial site-selection reports. You can cite the dataset vintage in your board presentation footnotes.

Want a density score? Ask SheetXAI to divide establishment count by ACS population (which it can also pull) and write a per-10k-residents column into column E.

What If the Data Is Not Quite Ready

County Business Patterns queries have a few reliable edge cases.

When your county list uses names instead of FIPS codes

Your workbook has "Cook County, IL" in column A rather than state and county FIPS codes.

Convert the county names in column A to state FIPS and county FIPS codes. Then pull 2021 County Business Patterns data for NAICS 722511 — establishments and total employees — into columns B and C.

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

Your field team thinks ZIP code is the right unit for site scoring.

Import Census ZIP Code Business Patterns data for NAICS 722511 for all ZIP codes in column A and write establishment count and employment into columns B and C. Flag any ZIP with no CBP data in column D.

When you need a second NAICS code for context

You also want NAICS 445 (grocery stores) as a proxy for anchor traffic near your sites.

For each county in my workbook (state FIPS in A, county FIPS in B), pull 2021 County Business Patterns establishment counts for NAICS 722511 and NAICS 445. Write restaurant establishments into column C, grocery establishments into column D.

When you need CBP plus population plus an income filter in one pass

Your board wants the final ranked list: density per capita, filtered to counties with median household income over $55,000.

For each county in my workbook (state FIPS in A, county FIPS in B), pull 2021 County Business Patterns establishment count for NAICS 722511 into column C. Fetch ACS 5-year total population into column D and median household income into column E. Filter to counties where income is above $55,000 and write those rows ranked by establishments-per-10k-residents into a new tab called Priority Markets.

The pattern: competitive analysis, income filter, and ranking in one prompt instead of across three tools.

Try It

Get the 7-day free trial of SheetXAI and open any workbook with a list of counties or ZIP codes, then ask it to pull County Business Patterns data for a target NAICS code. The Census Bureau integration is included in every SheetXAI plan. For related workflows, see how to enrich ZIP codes with ACS demographic data 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