Excel for SEO: Search Console Formulas, Pivot Tables and AI Labels
Excel for SEO mostly means working on Search Console exports: a pivot table by page and query, XLOOKUP to join lists, TEXTBEFORE and regex tests to group queries, a CTR curve from your own positions and a flag for queries split across two URLs. Google Sheets does the same, sometimes with a different function.
By Raúl Díaz, founder of Slibur
13 min read

In this article
Apart from the AI labels, which need an eligible plan, nothing here needs a paid SEO tool. Where the two programs differ, each formula comes twice: first for Excel for Microsoft 365, then for Google Sheets. Search Console data only covers Google, though. It can't show whether ChatGPT or another assistant mentions your brand, and that is a separate measurement, covered in our guide to choosing a ChatGPT SEO tool.
Excel and Google Sheets formulas for SEO at a glance
| Job | Excel for Microsoft 365 | Google Sheets |
|---|---|---|
| Recalculate CTR and average position | SUMIFS, SUMPRODUCT | SUMIFS, SUMPRODUCT |
| Match a crawl list to Search Console pages | XLOOKUP | XLOOKUP |
| Clean URLs before a lookup | TRIM, LOWER, TEXTBEFORE | TRIM, LOWER, REGEXREPLACE |
| Pull the folder of a URL or the first word of a query | TEXTAFTER, TEXTBEFORE | SPLIT, INDEX |
| Group queries by pattern | IFS with REGEXTEST | IFS with REGEXMATCH |
| Find queries split across pages | COUNTIFS, MAXIFS | COUNTIFS, MAXIFS |
| Label intent | Copilot pane | AI function |
On older Excel, check the version first. TEXTBEFORE needs Excel for Microsoft 365, Excel for the web or Excel 2024, and REGEXTEST needs Microsoft 365 or the web version.
Get the right Search Console export first
Open Performance, then Search results, pick a date range and click Export. Google offers three formats: Google Sheets, Microsoft Excel and CSV. Before you build anything, know the three limits of that file.
- It stops at 1,000 rows. Google's help page on exporting Search Console data (opens in a new tab) says the download is truncated to 1,000 rows of representative examples, while the totals in the report include what was cut. On a large site, your rows will add up to less than the total.
- It gives one dimension per tab. The report's table groups rows by the tab you select (Queries, Pages, Countries and so on). The download puts Queries, Pages, Countries, Devices, Search appearance and Dates in separate tabs, not a list of which query sent clicks to which page.
- Some queries never appear. Queries typed by very few people are left out to protect privacy. Google's post on performance data limits (opens in a new tab) shows why the visible rows never add up to the chart total, and the guide to (not provided) keywords covers what you can still recover.
How to get query and page in the same row
The cannibalization check later in this guide needs one row per query and page pair, and so does a useful pivot table. There are three ways to get those rows without writing code:
- Filter the report by one page (Page, Exact URL), export the Queries tab, add a column with that URL, and repeat for your most important pages. It's slow, but it works on any account.
- In Data Studio (called Looker Studio until April 2026), connect Search Console using the URL Impression table, which aggregates by page, then build a table with the page and query dimensions and download it.
- Use a Sheets add-on that reads the Search Console API. The API returns up to 25,000 rows per request, and Google puts the daily ceiling at 50,000 rows per site and search type.
Set up the workbook
Paste each raw export into its own tab and never type in it. Formulas live in a working tab that reads from the raw one, so next month you paste fresh data and everything recalculates. In Excel, turn the range into a table with Ctrl+T. In Sheets, freeze the header row and use whole-column references such as A:A.
Recalculate CTR as clicks divided by impressions, which is how Google defines it, instead of relying on the exported percentage. A real number can be summed and divided later; a formatted one can't.
To follow along, paste this sample into cell A1 of a new sheet and split it into columns (Data, Split text to columns in Sheets; Data, Text to Columns in Excel). The site, brand and numbers are invented for the exercise.
Query,Page,Clicks,Impressions,Position
how to make pour over coffee,https://www.example.com/blog/pour-over-guide,310,5200,2.1
pour over coffee ratio,https://www.example.com/blog/pour-over-guide,140,3900,3.4
pour over ratio,https://www.example.com/blog/pour-over-guide,22,1800,2.8
best burr grinder,https://www.example.com/blog/best-coffee-grinders,96,4100,4.6
best burr grinder,https://www.example.com/grinders/burr-grinder-pro,71,2900,6.2
burr grinder,https://www.example.com/grinders/burr-grinder-pro,58,3300,5.1
burr vs blade grinder,https://www.example.com/blog/best-coffee-grinders,35,1500,4.2
coffee grinder settings,https://www.example.com/blog/best-coffee-grinders,9,1400,5.5
what is a burr grinder,https://www.example.com/blog/best-coffee-grinders,12,2200,8.9
acme grinder,https://www.example.com/grinders/burr-grinder-pro,260,900,1.0
acme coffee,https://www.example.com/,410,1300,1.0
cold brew ratio,https://www.example.com/blog/cold-brew-guide,88,2600,3.0
cold brew ratio,https://www.example.com/blog/pour-over-guide,4,700,18.5
how long to steep cold brew,https://www.example.com/blog/cold-brew-guide,64,1900,2.6
cold brew concentrate,https://www.example.com/blog/cold-brew-guide,9,1600,11.3
gooseneck kettle,https://www.example.com/kettles/gooseneck,40,2400,6.7
gooseneck kettle temperature,https://www.example.com/kettles/gooseneck,30,1500,7.6
best gooseneck kettle,https://www.example.com/kettles/gooseneck,15,1700,9.4
Name the tab Data. The formulas below assume Query in A, Page in B, Clicks in C, Impressions in D, Position in E and CTR (=C2/D2) in F, with helper columns added from G onward.
Build a pivot table by page and query
A pivot table answers the first question of any audit: which pages earn the clicks, and from which queries.
In Excel, select the data and choose Insert, PivotTable. Drag Page to Rows, then Query underneath it, and drop Clicks and Impressions into Values. In Sheets, choose Insert, Pivot table, add Page and Query under Rows, and add Clicks and Impressions under Values, summarized by SUM.
Then add CTR as a calculated field rather than summing or averaging the CTR column:
- Excel: PivotTable Analyze, Fields, Items & Sets, Calculated Field, with the formula
=Clicks/Impressions. Microsoft's documentation says calculated fields work on the sum of the underlying data, which is what a CTR needs: total clicks over total impressions. - Sheets: next to Values, click Add, then Calculated field, set Summarize by to Custom and enter
=SUM(Clicks)/SUM(Impressions).
On the sample, the pivot by page comes out like this:
Page Clicks Impressions CTR
/blog/pour-over-guide 476 11600 4.1%
/grinders/burr-grinder-pro 389 7100 5.5%
/blog/cold-brew-guide 161 6100 2.6%
/blog/best-coffee-grinders 152 9200 1.7%
/kettles/gooseneck 85 5600 1.5%
/ (home) 410 1300 31.5%
Why you never average the CTR column
Averaging row CTRs gives every query the same weight, whatever its impressions. In the sample, the product page /grinders/burr-grinder-pro shows twice its real CTR if you average its rows. One small branded query with a huge CTR counts as much as two large generic ones. Divide summed clicks by summed impressions and the figure matches what the page actually earned.
Position needs the same care. Search Console's average position averages the position of every impression, so a query seen many times weighs more than a rare one. Rebuild it as an impression-weighted average:
=SUMPRODUCT(E2:E19,D2:D19)/SUM(D2:D19)
Cross two lists with XLOOKUP
XLOOKUP pulls a value from one list into another through a shared key, which in SEO is usually the URL. The classic use pairs a crawl or sitemap list with Search Console data: which pages you want indexed got no impressions at all?
Put your URL list in column A of a tab called Crawl, and the Pages tab of the export in a tab called Pages, with impressions in column C:
=XLOOKUP(A2,Pages!A:A,Pages!C:C,0)
The fourth argument returns 0 instead of #N/A when a URL never shows up in Search Console, so you can filter the column for zeros and start there. A page like /blog/french-press-guide, live on the site but absent from the export, comes back as 0.
XLOOKUP works in Excel for Microsoft 365, Excel 2024 and Excel 2021. Microsoft notes it isn't available in Excel 2016 or 2019, where INDEX with MATCH does the same job. Google Sheets has XLOOKUP with the same argument order, so the formula above runs unchanged.
Normalize URLs before you match
Lookups fail on tiny differences: a tracking parameter, uppercase letters, a stray space, a trailing slash. Clean both lists with the same helper column before you match them. This one strips parameters, lowercases and trims spaces; for trailing slashes, pick one rule and apply it to both lists:
Excel: =TRIM(LOWER(TEXTBEFORE(A2,"?",,,1)))
Sheets: =TRIM(LOWER(REGEXREPLACE(A2,"\?.*$","")))
That fifth argument of TEXTBEFORE (match_end, set to 1) is easy to miss. Without it, Excel returns #N/A for every URL that has no question mark, because TEXTBEFORE errors when the delimiter isn't in the text. With it, the end of the text counts as a delimiter and a clean URL comes back unchanged.
TRIM removes leading, trailing and repeated spaces. In Excel it leaves the nonbreaking space (character 160) that text copied from web pages can carry, so if a lookup still fails, replace it first with SUBSTITUTE(A2,CHAR(160)," ").
Group queries with TEXTBEFORE and regex
Grouping is where a spreadsheet beats the Search Console interface. Three helper columns cover most needs.
Folder of the page (column G). Totals by section show which part of the site carries the clicks.
Excel: =IF(TEXTAFTER(B2,"/",3)="","(home)",TEXTBEFORE(TEXTAFTER(B2,"/",3),"/",,,1))
Sheets: =IFERROR(INDEX(SPLIT(B2,"/"),1,3),"(home)")
TEXTAFTER with 3 skips the two slashes of https:// and the one after the domain, leaving the path. Google Sheets has no TEXTBEFORE in its function list, so SPLIT breaks the URL at each slash and INDEX takes the third piece (row 1, column 3), which is the folder.
First word of the query. Sorting by it puts every "how" question and every "best" comparison together, a quick way to see which kinds of question a page answers.
Excel: =TEXTBEFORE(A2," ",,,1)
Sheets: =INDEX(SPLIT(A2," "),1,1)
Query group by pattern (column H). A regular expression sorts queries into groups you define, here brand, questions, comparisons and the rest. Excel for Microsoft 365 calls the function REGEXTEST; Sheets calls it REGEXMATCH (opens in a new tab).
Excel:
=IFS(REGEXTEST(A2,"\bacme\b",1),"Brand",REGEXTEST(A2,"^(how|what|why|when|can|does|is)\b",1),"Question",REGEXTEST(A2,"\b(best|vs|review|top)\b",1),"Comparison",TRUE,"Other")
Sheets:
=IFS(REGEXMATCH(A2,"(?i)\bacme\b"),"Brand",REGEXMATCH(A2,"(?i)^(how|what|why|when|can|does|is)\b"),"Question",REGEXMATCH(A2,"(?i)\b(best|vs|review|top)\b"),"Comparison",TRUE,"Other")
Order matters. IFS stops at the first test that is true, so the brand rule goes first, or "is acme any good" would land in Question. The 1 at the end of REGEXTEST makes Excel ignore case, and (?i) does the same in Sheets. Excel uses the PCRE2 flavor of regex while Sheets uses RE2, so keep patterns simple (alternatives with a vertical bar, \b, ^ and $) and they behave the same in both.
Pivot by group next. In the sample, the two brand queries earn several times the CTR of any generic query, which is why the next steps leave brand rows out of every comparison by position.
Classify queries by intent with Copilot or the Sheets AI function
Regex handles patterns you can name. Intent is harder to pin down with rules, because the same need can be phrased in dozens of ways. An AI model can do the first pass.
Google Sheets. The AI function takes a prompt and an optional range. One query per cell:
=AI("Label the query in this cell as Informational, Commercial, Transactional or Navigational. Return only the label.",A2)
Google's help page for the AI function (opens in a new tab) lists the limits that affect a long export. It needs an eligible Google Workspace or Google AI plan. Only the first 350 selected cells with AI functions are generated at once, and there are short and long term generation limits. Responses are text only, a generation can't be undone, and Google warns that Gemini may suggest inaccurate information.
Excel. Microsoft retired the COPILOT worksheet function on September 14, 2026. A cell that still uses it returns #NAME? the next time it recalculates. The route now is the Copilot pane, which needs an eligible license: select the table, stay in edit mode and ask it to add an Intent column with only the four labels above. Copilot builds the column with Excel's own features, so every value stays editable.
Whichever program you use, three habits keep the labels usable:
- Give a closed list of labels and ask for exactly one per query.
- Run it on unique queries only (UNIQUE works in both programs), then bring the label back to every row with XLOOKUP.
- Check a sample by hand before trusting any total, and label ambiguous queries yourself.
Don't paste client data without checking first
Microsoft's privacy page for Microsoft 365 Copilot (opens in a new tab) says prompts, responses and data accessed through Microsoft Graph aren't used to train the foundation models behind Copilot. Google's privacy hub for Workspace says your content isn't used for model training outside your domain without permission.
Both statements are written for work accounts: Microsoft 365 commercial customers and Google Workspace. Check which account you're signed in with, and remember that neither promise overrides a client contract. Send only the query column, remove revenue and client names, and get written permission when the data belongs to someone else.
Build a CTR curve from your own positions
Your own export can show which queries get fewer clicks than their position should bring. Group rows into position bands, compute each band's CTR on non-brand queries, and flag the rows that earn far less than their band.
Start with a small table on a tab called Curve, with lower bounds in A, labels in B and the band CTR in C:
From Band CTR (C2, filled down)
1 1 to 3 =SUMIFS(Data!C:C,Data!I:I,B2,Data!H:H,"<>Brand")/SUMIFS(Data!D:D,Data!I:I,B2,Data!H:H,"<>Brand")
4 4 to 6
7 7 to 10
11 11+
The labels say "to" instead of using a hyphen on purpose. Excel turns entries that look like dates into dates (Microsoft's example is 12/2 becoming 2-Dec), and a label such as 4-6 looks like one.
Then add three columns to the Data tab:
Band (I): =XLOOKUP(E2,Curve!$A$2:$A$5,Curve!$B$2:$B$5,,-1)
Expected clicks (J): =D2*XLOOKUP(I2,Curve!$B$2:$B$5,Curve!$C$2:$C$5)
Snippet flag (K): =IF(AND(H2<>"Brand",D2>=1000,F2<0.5*XLOOKUP(I2,Curve!$B$2:$B$5,Curve!$C$2:$C$5)),"Check snippet","")
The -1 tells XLOOKUP to take an exact match or the next smaller value, so any average position from 4 up to just under 7 falls in the band that starts at 4. The flag fires when a row with real volume earns less than half its band's CTR. Change the 1,000-impression floor and the one-half ratio to suit your site.
On the sample, the bands come out like this:
Band Non-brand clicks Impressions CTR
1 to 3 624 15400 4.05%
4 to 6 309 15600 1.98%
7 to 10 57 5400 1.06%
11+ 13 2300 0.57%
Flagged: pour over ratio (1 to 3, expected 73 clicks, got 22)
coffee grinder settings (4 to 6, expected 28 clicks, got 9)
Check the snippet first on both flagged rows. When a title or description doesn't promise what the searcher wants, the result gets seen and skipped. Look at the live results too, since a SERP feature above you can cause the same gap; the guide to SEO impressions goes through the usual reasons impressions don't turn into clicks. Rewrite the title and description before touching anything else on the page.
This curve is a diagnostic, not a forecast. To turn it into projected clicks, and to see how published CTR studies compare, follow the SEO forecasting model. With few rows per band the curve gets noisy, so use at least three months of data and merge thin bands.
Flag cannibalization: one query, several pages
Once query and page share a row, three more columns find every query where your own pages split the clicks:
Pages with impressions (L): =COUNTIFS(A:A,A2,D:D,">=100")
Top page share (M): =MAXIFS(C:C,A:A,A2)/SUMIFS(C:C,A:A,A2)
Cannibalization (N): =IF(AND(L2>=2,M2<0.8),"Review","")
In the sample, "best burr grinder" splits its clicks between the buying guide and the product page. The leading page keeps a little over half of them, so the row is flagged. "Cold brew ratio" also shows two pages, but one keeps almost every click: two URLs in the report, no real contest.
Treat the flag as a shortlist, not a verdict. Two pages can rank for one query on purpose, and a flag in one month can be gone the next. Look at the leading page over several months before deciding. The fixes (merge, redirect, differentiate, re-point internal links) are in the keyword cannibalization guide.
Slibur dataChatGPT, United States, 4 answers, November 21, 2026
What ChatGPT says about Excel for SEO
We asked ChatGPT four questions on November 21, 2026, from the United States: how to use Excel for SEO and which formulas to learn first, how to find quick wins in a Search Console export, how to find keyword cannibalization in a spreadsheet, and whether Copilot or the Sheets AI function can group queries by intent.
- Only the tools themselves came up. Excel, Google Search Console and Google Sheets each appeared in three of the four answers. GA4, Screaming Frog, Looker Studio (now Data Studio) and Copilot appeared once each. No SEO add-in, template seller or SEO blog was named.
- Sources were official help pages. Two answers cited nothing. The other two cited support.google.com, developers.google.com and support.microsoft.com, and no third-party site.
- The cannibalization answer skipped the hard part. It told readers to "export the table with these dimensions", Query and Page, which the standard export doesn't give you in a single table (see the export section above).
- One formula breaks on clean URLs. The first answer suggested
=TEXTBEFORE(A2, "?")to strip parameters. On a URL with no question mark, that returns #N/A. - Fixed CTR targets, with no source. The quick-wins answer proposed target CTRs by position: 20% for the top three, 8% for positions 4 to 10 and 4% for 11 to 20. A curve built from your own export is a better yardstick.
- It knew about the retirement. The answer on intent flagged that the COPILOT worksheet function stopped working on September 14, 2026.
Two lessons if you work from answers like these. Test every formula on a row that lacks what it expects (a URL with no question mark, a one-word query), and distrust any step that assumes query and page arrive in the same export. And if you sell an SEO add-in or spreadsheet templates, note the absence: none was named, and every cited source was Google's or Microsoft's own documentation.
When the file gets too big for a spreadsheet
Excel stops at 1,048,576 rows by 16,384 columns per worksheet. Google Sheets allows up to 20 million cells or 100MB for a spreadsheet created in or converted to Sheets. Every whole-column SUMIFS and XLOOKUP adds recalculation work, so a big workbook slows down well before those ceilings.
Search Console has its own ceilings, covered earlier: 1,000 rows from the interface and 50,000 rows a day per site and search type from the API. The bulk export to BigQuery holds all the performance data except anonymized queries, but at that point you're working in a database, not a sheet.
When your query and page pairs reach the million-row range, move the same steps to code. The Python for SEO guide pages through the Search Console API and groups queries with a short script. If the workbook is for planning content rather than auditing it, the pillar pages guide shows how to put the topic map in a spreadsheet, one row per URL.
A monthly routine in one workbook
- Paste the new exports into the raw tabs, without editing them.
- Refresh the pivot tables. In Excel, use Data, Refresh All; a Sheets pivot table refreshes whenever its source cells change.
- Sort by the Snippet flag column and rewrite titles and descriptions for the flagged rows.
- Filter the Cannibalization column and decide page by page.
- Check the Crawl tab for pages with zero impressions.
- Run the AI labels again only for queries that are new this month.
To present the results, the SEO report template shows which numbers to put in front of a client and which to leave in the workbook.
Keep the Question group from column H at hand when you finish. Those are the kind of questions people also put to AI assistants, and no spreadsheet can see those answers. Add up to 10 of them to Slibur's 7-day free trial, which needs no card, and you'll see which brands ChatGPT, Google AI Overviews, Claude, Perplexity and Grok name for each one and which pages they cite.
Frequently asked questions
Is Excel or Google Sheets better for SEO work?
Both handle Search Console exports well. Excel for Microsoft 365 has TEXTBEFORE, TEXTAFTER and REGEXTEST and holds 1,048,576 rows per worksheet. Sheets has REGEXMATCH, SPLIT, the AI function and easy sharing, with a ceiling of 20 million cells per spreadsheet. Pick the one your team already uses: every step in this guide has a version for each.
How do I get more than 1,000 rows from Search Console into a spreadsheet?
The interface export stops at 1,000 rows. You can filter by page or country and export several times, use the Search Console connector in Data Studio (formerly Looker Studio), or install a Sheets add-on that reads the API, which returns up to 25,000 rows per request and 50,000 per day per site and search type. Past that, use the bulk export to BigQuery or a script.
Which Excel formulas should an SEO learn first?
XLOOKUP to join lists, SUMIFS and COUNTIFS for totals by group, TEXTBEFORE and TEXTAFTER to split URLs and queries, REGEXTEST to group by pattern, IFS for labels, and TRIM with LOWER to clean URLs before a lookup. Add a pivot table with a calculated CTR field and you can answer most audit questions without anything else.
Why doesn't my pivot table CTR match Search Console?
Usually because CTR was averaged instead of recalculated from sums. Use a calculated field that divides clicks by impressions. Even then, a truncated export and the anonymized queries Google leaves out mean your rows can add up to less than the totals in the report.
Can Copilot or the Google Sheets AI function classify keywords by intent?
Yes, as a first pass. In Sheets, =AI("prompt", A2) labels one query per cell, with limits such as 350 cells generated at a time. In Excel, the COPILOT function was retired on September 14, 2026, so use the Copilot pane in edit mode instead. Give a fixed list of labels and check a sample by hand.
Is it safe to put client Search Console data into Copilot or Gemini?
Microsoft says Copilot prompts aren't used to train its foundation models, and Google says Workspace content isn't used for model training outside your domain without permission. Both apply to work accounts, and neither replaces the client's consent: share only the query column, remove revenue and names, and check the contract first.

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.