Use Coupon Code ILOVEJENIUS for 10% off

10 Google Sheets Formulation Each search engine optimisation Ought to Know

Excel has all the time been a favourite instrument amongst SEOs, however now there’s a brand new, doubtlessly extra highly effective child on the block: Google Sheets.

I’m positive most of you’re considerably conversant in Sheets (if not, it’s mainly similar to Excel, however cloud-based and utterly free) and know simply how highly effective it may be relating to collaboration.

However, its capabilities attain far past collaboration.

Google Sheets can be utilized to scrape knowledge from web sites, create semi-automated search engine optimisation workflows, manipulate large knowledge units (e.g. a Web site Explorer export), automate follow-ups for outreach campaigns, and rather more.

On this submit, I’ll introduce you to 10 Google Sheets formulation and present how you should use them for on a regular basis search engine optimisation duties.

Let’s begin with the fundamentals…

On this quick part, I’m going to share three primary must-know formulation.

It doesn’t matter what type of search engine optimisation work I’m doing in Google Sheets, I discover myself utilizing these three formulation (nearly) each time:

  • IF;

Let’s begin with an IF assertion.

That is tremendous easy; it’s used to examine if a situation is true or false.

Syntax: =IF (situation, value_if_true, value_if_false)

Right here’s an instance spreadsheet containing an inventory of key phrases with their respective estimated search volumes (be aware: these have been gathered utilizing Key phrase Explorer):

Let’s assume, hypothetically, that now we have a powerful web site able to rating #1 for any of those key phrases. Nevertheless, we solely need to go after key phrases which can be probably to herald 500+ guests per 30 days (assuming now we have a #1 rating).

In keeping with this examine, #1 rankings within the US (desktop searches solely) have a 29% CTR, roughly.

Sidenote. We don’t suggest counting on this technique to estimate search site visitors as CTR varies tremendously throughout completely different queries, gadgets, and so forth. That’s why we use clickstream knowledge to estimate site visitors.

So, let’s write an IF assertion that may return “GOOD” for key phrases which can be prone to carry 500+ guests (i.e. these the place 29% of the search quantity is larger than or equal to 500) and “BAD” for the remainder.

Right here’s the components:



Right here’s what this does (in plain English):

  1. It checks to see if B2*zero.29 (i.e. 29% of the search quantity) is larger than or equal to 500;
  2. If the situation is true, it returns “GOOD”. If it’s false, it returns “BAD”.

This works very effectively for our present knowledge set, however look what occurs once we throw some non-numerical values into the combo:

That’s an error.

This occurs as a result of it’s not possible to multiply a non-numerical worth by zero.29 (clearly).

Sidenote. I’ve added some conditional formatting so wherever the IF assertion evaluates to TRUE, the cells are highlighted inexperienced. If the assertion evaluates to FALSE, they’re highlighted purple.

That is the place IFERROR is useful.

IFERROR lets you set a default worth ought to the components lead to an error.

Syntax: =IFERROR (original_formula, value_if_error)

Let’s incorporate this into the instance above (we’ll go away the cell clean if there’s an error) and see what occurs:


Excellent — that’s the components full!

OK, so for those who solely ever work with a tiny quantity of knowledge, be happy to skip straight to the following part.

However, given the truth that this information is for search engine optimisation’s, I’m going to imagine that you just’re working with fairly massive quantities of knowledge frequently.

If that is so, I’d hazard a guess that you just spend far an excessive amount of time dragging formulation down throughout tons of, probably even 1000’s, of cells.


Syntax: =ARRAYFORMULA (array_formula)

Mainly, an ARRAYFORMULA converts your unique components into an array, thus permitting you to iterate the identical components throughout a number of rows by writing solely a single components.

So, let’s delete all formulation in cells B2 onwards, and wrap all the components at the moment in cell B1 in an ARRAYFORMULA, like so:




That’s the fundamentals coated; let’s check out some extra helpful formulation.

Sidenote. Right here’s a spreadsheet exhibiting how every of those formulation work (be aware: cells containing formulation will likely be highlighted yellow). I’ll be together with extra of those spreadsheets all through the submit.

1. Use REGEXTRACT to extract knowledge from strings

REGEXTRACT makes use of common expressions to extract substrings from a string or cell.

Syntax: REGEXEXTRACT (textual content, regular_expression)

Listed below are only a handful of potential use circumstances for this:

  • Extract domains from an inventory of URLs (preserve studying to see an instance!);
  • Extract the URL (i.e. with out the basis area);
  • Examine if URL makes use of HTTP or HTTPS;
  • Extract electronic mail addresses from an enormous chunk of textual content;
  • Establish URLs with/with out sure phrases in them from an inventory of URLs (e.g. URLs containing the “/class/guest-post” slug).

Let’s assume we need to extract the basis domains from an inventory of “write for us” web page URLs (i.e. visitor submit alternatives).

In column B, we are able to write a REGEXTRACT components to do that.

Right here is the regex syntax we’d like: ^(?:https?://)?(?:[^@n]+@)?(?:www.)?([^:/n]+)

Sidenote. Should you’re not conversant in regex (don’t fear, I’m not nice at it both), you could have two choices: (i) Study the fundamentals — take a look at (ii) Google the answer for no matter you want — significantly, it’s shocking what you could find with a little bit of Googling!

Right here’s our remaining components:


Paste this into cell B2 and, hey presto, we’ve extracted the area.

Let’s wrap this in an ARRAYFORMULA and IFERROR to finish all the column.


GIF Sidenote. Right here’s the spreadsheet exhibiting how this components works.

2. SPLIT strings into a number of knowledge factors

SPLIT divides (i.e. splits) strings into fragments utilizing a delimiter.

Syntax: SPLIT (textual content, delimiter)

Listed below are only a handful of potential use circumstances for this:

  • Break up a prospect’s full identify into “first identify” and “final identify” columns;
  • Break up a URL into three columns for HTTP protocol, root area, and URL slug;
  • Break up an inventory of comma-separated values into a number of columns;
  • Break up a root area into 2 columns for area identify and area extension (e.g. .com, .org, and so forth.)

I’ve a pleasant listing of Ahrefs’ group members (full names) in a spreadsheet.

Right here’s a easy SPLIT components we may use in cell B2 to divide these into first identify and final identify:

=SPLIT(A2,” ”)

GIF Sidenote. We’re utilizing an area (i.e. ” ”) as our delimiter as this tells the SPLIT components the place to separate the string.

Once more, let’s wrap this in an IFERROR and ARRAYFORMULA to break up all the listing with a single components.



Right here’s one other instance components that may break up root domains into web site identify and area extension:


GIF Sidenote. Right here’s the spreadsheet.

three. Merge a number of knowledge units utilizing VLOOKUP

VLOOKUP lets you search a vary utilizing a search key—you may then return matching values from a selected cell in stated vary.

Syntax: VLOOKUP(search_key, vary, index_key)

Listed below are only a handful of potential use circumstances for this:

  • Merging knowledge from a number of sources (e.g. merging an inventory of domains with corresponding Ahrefs DR rankings from a separate sheet);
  • Checking if a worth exists in one other knowledge set (e.g. checking for duplicates throughout two or extra lists of outreach prospects);
  • Pulling in electronic mail addresses (from a grasp database of contacts) alongside an inventory of prospects.

Let’s assume now we have an inventory of outreach prospects (i.e. a bunch of individuals linking to a competitor’s web site, pulled from Web site Explorer). We even have a grasp database of contact data (i.e. electronic mail addresses) in one other spreadsheet.

Web site Explorer export (be aware: I eliminated lots of the columns right here, as a lot of the information isn’t wanted for this instance).

Grasp contact database — that is the database we’ll be querying utilizing a VLOOKUP perform.

Sidenote. I added two new (empty) columns for the VLOOKUP knowledge (i.e. full identify and electronic mail) to the Web site Explorer export sheet. This will likely be proven within the subsequent few screenshots.

We don’t need to waste time searching for contact data that we have already got, so let’s use VLOOKUP to question the grasp database and see if we have already got contact information for any of those prospects.

Right here’s the components we’re going to make use of:

=VLOOKUP(D2:D,‘Grasp contact database ‘!A:C,2,false)


OK, let’s do the identical for the electronic mail column; we’ll additionally wrap each formulation in an IFERROR and ARRAYFORMULA.

GIF Sidenote. Right here’s the spreadsheet.

four. Scrape knowledge from any web site utilizing IMPORTXML

IMPORTXML permits you to import knowledge (utilizing an XPath question) from plenty of structured knowledge sorts together with XML, HTML, and RSS (amongst others).

In different phrases, you may scrape the online with out ever leaving Google Sheets!

Syntax: IMPORTXML(url, xpath_query)

Listed below are only a handful of potential use circumstances for this:

  • Scraping metadata from an inventory of URLs (e.g. title, description, h-tags, and so forth);
  • Scraping electronic mail addresses from net pages;
  • Scraping social profiles (e.g. Fb) from net pages;
  • Scraping lastBuildDate from RSS feeds (it is a actually sneaky solution to see how just lately the positioning was up to date with out even having to load the web site!)

Let’s assume that we wished to seize the meta title for our submit about key phrase analysis.

We will see within the HTML that the meta title reads: “How To Do Key phrase Analysis in 2017 — Ahrefs’ Information”.

The XPath question we use to seize the meta title is kind of merely: “//title”

Right here’s the components:


It’s additionally potential to make use of cell references within the components; this makes scraping knowledge for a bunch of URLs tremendous easy.

GIF Sidenote. Sadly, IMPORTXML doesn’t work with an ARRAYFORMULA, so it’ll be a case of manually dragging this one down.

IMPORTXML isn’t restricted to scraping primary meta tags, both; it may be used to scrape just about something. It’s only a case of understanding the XPath.

Listed below are just a few doubtlessly helpful XPath formulation:

  • Extract all hyperlinks on a web page: “//@href”;
  • Extract all inner hyperlinks on a web page: “//a[contains(@href, ‘’)]/@href”
  • Extract all exterior hyperlinks on a web page: “//a[not(contains(@href, ‘’))]/@href”;
  • Extract meta description: “//meta[@name=‘description’]/@content material”;
  • Extract H1: “//h1”;
  • Extract electronic mail handle(es) from web page: “//a[contains(@href, ‘mailTo:’) or contains(@href, ‘mailto:’)]/@href”
  • Extract social profiles (i.e. LinkedIn, Fb, Twitter): “//a[contains(@href, ‘’) or contains(@href, ‘’) or contains(@href, ‘’)]/@href”
  • Extract lastBuildDate (from RSS feed): “//lastBuildDate”

You will discover the XPath for any factor by doing the next (in Chrome):

Proper-click > Examine > Proper-Click on > Copy > Copy XPath

Sidenote. Right here’s the spreadsheet (tons of examples on this one :D)

5. SEARCH strings for sure values

SEARCH permits you to examine whether or not or not a worth exists in a string; it then returns the place at which the worth is first discovered within the string.

Syntax: SEARCH (search_query, text_to_search)

Listed below are some use circumstances:

  • Examine if a selected subdomain exists in URL (that is helpful for bulk categorizing an inventory of URLs);
  • Categorize key phrases into numerous intent-based classes (e.g. branded, business, and so forth);
  • Seek for particular, undesirable characters inside a URL;
  • Seek for sure phrases/phrases inside a URL to classes hyperlink prospects (e.g. “/class/guest-post”, “sources.html”, and so forth)

Let’s check out an instance of SEARCH in motion.

Here’s a listing of the highest 300+ pages on (be aware: I used Web site Explorer to assemble this knowledge):

Sidenote. I cleaned up the information within the screenshot above by eradicating just a few columns; Web site Explorer really provides you rather more data than this (e.g. high key phrase for every URL, site visitors quantity, search quantity, place, and so forth)

The entire pages with /weblog/ within the URL are weblog posts. Let’s say that I wished to tag every of those pages as “Weblog submit” throughout a content material audit.

SEARCH (mixed with an IF assertion — this was mentioned earlier within the information) can do that in seconds; right here’s the components:



Let’s wrap it in an IFERROR and ARRAYFORMULA to neaten issues up.


Listed below are just a few different helpful formulation:

  • Discover “write for us” pages in an inventory of URLs: =IF(SEARCH(“/write-for-us/”,A2),“Write for us web page”,””);
  • Discover useful resource pages in an inventory of URLs: =IF(SEARCH(“/sources.html”,A2),“Useful resource web page”,””);
  • Discover branded search phrases (in an inventory of key phrases): =IF(SEARCH(“brand_name”,A2),“Branded key phrase”,””);
  • Establish inner/exterior hyperlinks (from an inventory of outbound hyperlinks): =IF(SEARCH(“”,A2),“Inner Hyperlink”,“Exterior Hyperlink”);

Sidenote. Right here’s the spreadsheet (just a few examples on this one, too!)

6. Import knowledge from different spreadsheets utilizing IMPORTRANGE

IMPORTRANGE lets you import knowledge from some other Google Sheet.

It doesn’t must be in your Google Drive, both; it may belong to another person (be aware: you will have permission to entry the sheet if that is so!)

Syntax: IMPORTRANGE (spreadsheet_ID, range_to_import)

Listed below are just a few use circumstances:

  • Create client-facing sheets that piggyback off your “grasp” spreadsheet;
  • Search and cross reference knowledge throughout a number of Google Sheets (i.e. utilizing IMPORTRANGE mixed with VLOOKUPs);
  • Pull in knowledge from one other sheet to be used in an information validation;
  • Pull involved knowledge from a “grasp” spreadsheet utilizing VLOOKUPs

Let’s check out an instance of IMPORTRANGE in motion.

Here’s a sheet with an inventory of hypothetical search engine optimisation shoppers + their budgets:

Let’s assume that I wished to make use of this consumer listing in one other Google Sheet — I can import this complete knowledge vary utilizing the next components:


GIF Sidenote. Right here is the place to search out your spreadsheet key.

Let’s additionally assume that you just’re recording hyperlinks constructed for these shoppers in a grasp spreadsheet; in a single column you could have the hyperlink URL and within the different, you need to report which consumer the hyperlink was for.

You need to use IMPORTRANGE to create a dropdown of all shoppers utilizing an information validation, like so:


This dropdown will self-update everytime you add/take away shoppers out of your grasp spreadsheet.

Sidenote. Right here’s the principle spreadsheet (and the information spreadsheet).

7. QUERY knowledge units utilizing SQL queries (this one is loopy highly effective!)

QUERY is like VLOOKUP on steroids. It permits you to question knowledge utilizing SQL, which lets you get super-granular relating to knowledge querying/retrieval.

Syntax: QUERY (vary, sql_query)

Listed below are just a few use circumstances:

  • Question a grasp hyperlink prospect database for particular prospects (e.g. discover solely prospects tagged as visitor submit alternatives, with a DR of above 50, and phone particulars current);
  • Create super-granular client-facing paperwork that pull in knowledge from a “grasp” spreadsheet;
  • Question an enormous on-site audit to pluck out solely the pages that want consideration.

Let’s return to our sheet of tagged “weblog posts”.


If we wished to tug in the entire URLs that have been tagged with “weblog submit” right into a model new spreadsheet, we may use this QUERY perform:

=QUERY(DATA!A:B,“choose A the place B = ‘Weblog Put up’”)

GIF Sidenote. This tells the spreadsheet to pick out all of the values in column A the place column B = “Weblog Posts”.

However let’s say that we had a much bigger knowledge set. An export file from Web site Explorer, maybe.

These export recordsdata might be fairly knowledge heavy, so let’s assume that we wished to tug out an inventory of all referring pages with the next attributes:

  • Dofollow hyperlink;
  • DR > 50;
  • Backlink standing = lively (i.e. not tagged as “eliminated”);
  • Exterior hyperlinks rely < 50;

Right here’s the components:

=QUERY(‘DATA — web site explorer export’!A2:R,“SELECT E the place D > 50 AND H < 50 AND M = ‘Dofollow’ AND N <> ‘REMOVED’”)


NOTE: It’s additionally potential to include IMPORTRANGE right into a QUERY perform; this lets you QUERY knowledge from different sheets.

Sidenote. Right here’s the spreadsheet.

Ultimate ideas

Google Sheets is insanely highly effective; this submit solely scratches the floor of what you are able to do with it.

I’d suggest taking part in round with the formulation above (seize the included spreadsheets right here) and seeing what you may provide you with. I additionally suggest testing the total library of Google Sheets formulation.

However, that’s nonetheless just the start: Google Sheets additionally integrates with Zapier and IFTTT, which implies you may join with tons of of different instruments and companies, too.

And if you wish to get actually superior, look into Apps Script—it’s loopy highly effective!

When you have any artistic makes use of for Google Sheets of your individual, please let me know within the feedback. I’d love to listen to them!

Leave a Reply