Back to Ahrefs in Excel
SheetXAI logo
Ahrefs logo
Ahrefs · Excel Guide

Build a Keyword Gap Analysis Table Across Three Domains in Google Sheets

The Scenario

You are an SEO director at a SaaS company. The quarterly content strategy review is next Wednesday. Your VP wants to know which keywords two main competitors rank for that your site does not, so the team can identify the highest-value gaps to close in Q3.

Three domains: yours and two competitors. You need organic keywords for all three in a single Excel workbook, a Gap tab showing what competitors have that you do not, and enough volume data to prioritize the list.

The bad version of this week:

  • You export organic keyword CSVs from Ahrefs for all three domains
  • You import each into a separate Excel tab
  • You try to write VLOOKUP formulas across the tabs to find gaps
  • The VLOOKUP breaks because keyword text formatting is slightly different between the three exports
  • You spend Tuesday afternoon fixing formulas instead of analyzing results
  • You walk into Wednesday's review with a spreadsheet that kind of works and a long explanation of what to ignore.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook that pulls organic keywords for all three domains from Ahrefs and does the gap analysis without you writing a formula.

Open the SheetXAI sidebar and type:

Fetch all organic keywords for the three domains in cells A1, A2, and A3 from Ahrefs. Write each domain's keywords to a separate tab — one tab per domain — with keyword in column A, position in column B, and search volume in column C. Then find all keywords in the competitor tabs that are NOT in my tab (my domain is in A1) and list them in a new tab called "Gap" with keyword, search volume, and which competitor ranks for it.

SheetXAI pulls keywords for all three domains, builds three data tabs, runs the gap comparison, and writes the Gap tab. The content strategy review has its foundation.

What You Get

Four tabs:

  • Your domain tab — keywords, positions, volume
  • Competitor 1 tab — same structure
  • Competitor 2 tab — same structure
  • Gap tab — keywords competitors rank for that you do not, with volume and source competitor

The Gap tab is the deliverable. Sort by search volume descending and you have a prioritized Q3 content roadmap.

Want to filter the gap to keywords above a volume threshold? Add that condition and SheetXAI applies it.

What If the Data Is Not Quite Ready

Keyword gap analysis always surfaces edge cases after you see the data. SheetXAI handles them in the same prompt.

When you want to exclude branded keywords from the gap

Competitor brand terms should not be on your content roadmap.

After building the Gap tab, remove any keyword that contains a competitor brand name from the list. Focus the gap analysis on non-branded terms only.

When the VP wants only keywords with volume above 500

Low-volume gaps are not worth the Q3 investment.

After building the Gap tab, filter to keywords with monthly search volume above 500. Sort by volume descending.

When you want to see only keywords where competitors rank in positions 1-10

Position matters. A keyword where a competitor is on page 1 and you are not ranked at all is a higher-priority gap than a keyword where the competitor is on page 3.

After building the Gap tab, add a column showing which position each competitor holds for that keyword. Flag any gap keyword where the competitor is in positions 1 through 10 as "High Priority" in a separate column.

When the analysis needs to cover five competitors, not two

The VP wants a comprehensive market view across the full competitive set.

Fetch organic keywords for all six domains in cells A1 through A6. Write each to a separate tab. Then build a Gap tab showing all keywords that any of the five competitors rank for but my domain (A1) does not. Include search volume and a column showing how many of the five competitors rank for each gap keyword. Sort by that competitor count descending.

The pattern: the gap analysis is one prompt. Filtering, position data, and expanded competitor sets extend the same prompt without switching tools.

Try It

Get the 7-day free trial of SheetXAI and open any Excel workbook with your domain and competitor domains in cells A1, A2, A3, then ask it to build a keyword gap analysis from Ahrefs. The Ahrefs integration is included in every SheetXAI plan. For related workflows, see how to export a competitor's top organic pages in Excel or the Ahrefs in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more