Today we are going to discover the power of Google Sheets.
Rather than just give you a few helpful formulas and static solutions, I wanted to show you what's possible and inspire you to get stuck in.
With 100 slides and 20 minutes we need to keep pace but my slides are available to reference at the end, plus I’ve built a supporting tool which pulls this all together for you.
First, we will take a look at the more frequently used functions
And then dive into a variety of applications.
So not only can you use the formulas you’ll see today but I'm hoping this will arm you with the tools to solve the problems with your data.
First, a quick note on Query.
Query is arguably the most powerful function in Google Sheets but it’s too complex to cover today
It’s pseudo SQL for sheets
It’s the backbone of my Search Console Explorer (and most of my Sheets based tools)
And here are the resources where I have covered this in more depth.
Whilst we haven’t covered it today, you will see query come into play when we are dealing with search functionalities.
Casing issues and spacing issues. Easily solved. First we./…
This tool is designed to extract the people also asked feature results from google search. With the extract being single cell containing the question, answer and URL. We needed a way to separate these out
Firstly, we extract the question. That’s easy, as all questions end in a ?
From there, we need to use a combination of SEARCH, LEN AND MID ------ SEARCH (find where this is), LEN (count how long this is), MID (extract from the point we found for the length we counted)
To add more insight, we can also count the type of questions being asked and the number of times a domain features. Here we are counting WHO with COUNTIF
And here we are using COUNTA to count how many values are in our list.
Search console explorer is doing exactly this.
Here we see the Query function in action, which powers the search functionality. It literally says return results where the query in Col A matches the Include and doesn’t match the exclude. Whilst we cant dive on this today I can show you
The segmented insight. From the results returned by the search functionality, Im using SUMIF and COUNTIF to add further insight.
To identify the new terms, we simply count where the +/- clicks is more than 0.
And we use this same logic in our COUNTIF, using CONCATENATE to wrap the number with the text seen. So we now get via 106 terms.
So you can dive into the tool yourself here. I encourage you to click around and explore the formulas used within in. They all use this similar logic and it’s surprisingly simple in function compared to its value.
So, query again. Unavoidable when we are dealing with search functionalities. Again my other talk covers this in more depth but the premise here is simple.
Select all data from this Table where A contains cell E2 (in green) [[[ you can lift this formula straight out and use it with your data ]]]
By changing contains to matches we now have regex search functionality. You can see im now searching for terms matching YAMAHA OR COLCHESTER
So conditional and multi criteria search functionality is surprisingly simple too. In its simplest form, we can achieve this with IF logic. Take this new switch we have added, for example. All our formula is doing is saying IF this switch it set to YES then use this QUERY but otherwise show “not allowed”
Which we can see here
Jumping back to the Search Console Explorer, again we can marvel at the simplicity. Literally, if EXCLUDE is blank, compute the purple QUERY which handles the include only, but otherwise compute the blue QUERY which handles both include and exclude. Voila! Variable handled.
Anatomy of keyword research, we start with the query (or keyword)
Then we can lookup data from other tables, such as global search volume. (Note, named range). The IFERROR in red is just error handling, so if the VLOOKUP is not able to find A3 it will return NOT FOUND rather than return an error
Then we can look up LOCAL SV too, along with any SERP features we might want. So SV is column 2
And this is column 34.
Next, we might want to lookup Google Search Console data to see if the client has received any visibility for these queries. (Note, if anything will shatter your ‘confidence’ on search volumes more than pulling impression data in alongside SV! ;P) So the table has changed but again we need column 2
Column 4
And column 8
We can calculate custom insights. So for example, if we had a CTR trend for non-brand we might see how this could potentially translate to traffic so we might add some calculated insights. Here we are working out the potential visits based on the SV and the custom CTR for position 1 non brand. Note, Both D and 2 are locked.
And here is the CTR for position 10. Again, just an example.
And now onto the categories. These can be so powerful and they’re central to most of the cool things I achieve in Data Studio. Consider them switches, binary. Yes / No. On / Off. 1. 0.
So how do we do it? We are matching the keyword against a list of keys in another tab which we can see here. So if bike, cycle, moped scooter etc is found, mark this as MOTORBIKE otherwise it’s NON-Motorbike.
Run this array and we can quickly categorise the data accordingly. There is no denying this one is more complex but you only need to align the keyword (Note A is locked, allowing only the row to change) and the Cat Data to look up against. But better yet, rather than use static values (in green) we can simply invert to the corresponding headings.
Tada! So the output is the same as before, except now its using P2 (motorbike/cycle) and if not matched then “NON-P2” (motorbike/cycle)
But that was just the Master sheet. That’s the data dump. That’s not where we glean our insights. And now you’ll see why it was impossible to completely avoid QUERY function today.
So we can order by Local SV,
Most Impressions
Enter a search term (or terms, as this using MATCHES for regex functionality)
And the categories we just applied.
We can enrich with overviews and summaries.
All of these columns but 1 are a simple SUM on the contents of column C from row 9 onwards (so aligned with the search refinement)
This one uses average
We can add sparklines too! This is using the last 12 months of search volume data, seen on the right.
We can set a high and low colour.
It looks like this! Column chart type, red is low, green is high.
There are other types, so more sparkline-y, and you can set custom colours, widths etc, but I prefer the column type.
So not only did we add Trend sparklines to query level but due to those SUM summaries, we can also show aggregated trends based on the search refinement. It’s no different to the previous formula, it’s just referencing those SUMMED totals.
It’s all well and good being able to see the trends but it’s also helpful to see some things in black and white. Here, we can pluck out the peak month and add this above the aggregated sparkline. So as we refine with our search functionality, we can easily see the associated peak.
The upper is transforming the output to uppercase but otherwise we are using INDEX and MATCH to index the months (row 8), and match to the max data in row 7 (The SUM’d TOTALS)
This is just a quick example of how I use two basic query functions to help me be more efficient at keyword research. We can see here that rather than filtering my data in the master tab, I am able to quickly and easily query my master table to check if a keyword is included, and then check others that match.
So here its where A EQUALS A10
And here where A contains A16
Then much like before, we have formed a quick summary using CONCATENATE and COUNTA, with an IF to handle whether or not to run.