5 Advanced Google Sheets Tips for Marketers (Mostly SEOs)

I’m assuming here you already know how vlookup() function works. Yes, nesting index() and match() is better, but for the beginners out there, just figuring out vlookup() will be HUGE. So if you never managed to get a vlookup() function to work, stop reading this and go research that instead.

With that out of the way and expectations set about difficulty, let’s talk about this incredibly useful function, if you can wrap your head around how it works — I’m talking about indirect() function.

Here’s a useful image I found on Sheetgo blog that illustrates the possible results. I find the use case illustrated in D5 field especially interesting, as knowing this formula when I was working at Sellfy would make it possible for me to work without bothering the devs on more than 1 campaign.

Now, some practical example that uses indirect() function 👇

1 Sum everything in column ABOVE this cell

Super useful for when you need to calculate list of, for example, expenses — that just keep piling up. And then you add a row at the very top of the list. Without this, the sum() function will annoyingly not “expand” to include the new row. So use this instead.

=sum(INDIRECT("C4:"&ADDRESS(ROW()-1,COLUMN(),4)))

An example of how adding 1 row at the top of the list breaks the sum() function. Worst case is when you don’t know this is happening.

2 Standardisation of URL (no www, https, trailing slash)

Pretty useful I would say, when you scraped a list of URLs and need them all to be in the same style.

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(RIGHT(A2,1)=“/“,LEFT(A2,LEN(A2)-1),A2),”https://“,,1),”http://“,,1),”www.”,,1)

3 Get domain name from URL

So the problem with this formula is that it doesn’t filter out subdomains and it’s kinda hard to make these kind of formulas play nice with both subdomains and TLDs like .co.uk etc.

=lower(trim(REGEXEXTRACT(REGEXREPLACE(REGEXREPLACE(C2,”https?://“,””),”^(w{3}\.)?”,””)&”/“,”([^/?]+)”)))

And so with this formula, if you have a huge list with URLs and, for example, there’s all kinds of versions of wikipedia inside, instead of getting one clean domain name wikipedia.org, you will end up with multiple subdomains like en.wikipedia.org, de.wikipedia.org, es.wikipedia.org, it.wikipedia.org etc.

If that’s what you need - great. If not, the solution to this is using a script as described in this StackOverflow answer. The added bonus here is that websites hosted on .blogspot.com and some others are treated as TLDs and won’t show simply as blogspot.com in your list.

4 Get unique items from multiple columns

Pretty much does what is says. If you have multiple columns of similar data and want to find only unique values - this is the formula to do it.

=unique(query({C3:C;D3:D;E3:E}, “where Col1 <>’’”))

This formula gets quite messy if you have a lot of columns, for example,  here’s another version for 160 columns.

=unique(query({C6:C;D6:D;E6:E;F6:F;G6:G;H6:H;I6:I;J6:J;K6:K;L6:L;M6:M;N6:N;O6:O;P6:P;Q6:Q;R6:R;S6:S;T6:T;U6:U;V6:V;W6:W;X6:X;Y6:Y;Z6:Z;AA6:AA;AB6:AB;AC6:AC;AD6:AD;AE6:AE;AF6:AF;AG6:AG;AH6:AH;AI6:AI;AJ6:AJ;AK6:AK;AL6:AL;AM6:AM;AN6:AN;AO6:AO;AP6:AP;AQ6:AQ;AR6:AR;AS6:AS;AT6:AT;AU6:AU;AV6:AV;AW6:AW;AX6:AX;AY6:AY;AZ6:AZ;BA6:BA;BB6:BB;BC6:BC;BD6:BD;BE6:BE;BF6:BF;BG6:BG;BH6:BH;BI6:BI;BJ6:BJ;BK6:BK;BL6:BL;BM6:BM;BN6:BN;BO6:BO;BP6:BP;BQ6:BQ;BR6:BR;BS6:BS;BT6:BT;BU6:BU;BV6:BV;BW6:BW;BX6:BX;BY6:BY;BZ6:BZ;CA6:CA;CB6:CB;CC6:CC;CD6:CD;CE6:CE;CF6:CF;CG6:CG;CH6:CH;CI6:CI;CJ6:CJ;CK6:CK;CL6:CL;CM6:CM;CN6:CN;CO6:CO;CP6:CP;CQ6:CQ;CR6:CR;CS6:CS;CT6:CT;CU6:CU;CV6:CV;CW6:CW;CX6:CX;CY6:CY;CZ6:CZ;DA6:DA;DB6:DB;DC6:DC;DD6:DD;DE6:DE;DF6:DF;DG6:DG;DH6:DH;DI6:DI;DJ6:DJ;DK6:DK;DL6:DL;DM6:DM;DN6:DN;DO6:DO;DP6:DP;DQ6:DQ;DR6:DR;DS6:DS;DT6:DT;DU6:DU;DV6:DV;DW6:DW;DX6:DX;DY6:DY;DZ6:DZ;EA6:EA;EB6:EB;EC6:EC;ED6:ED;EE6:EE;EF6:EF;EG6:EG;EH6:EH;EI6:EI;EJ6:EJ;EK6:EK;EL6:EL;EM6:EM;EN6:EN;EO6:EO;EP6:EP;EQ6:EQ;ER6:ER;ES6:ES;ET6:ET;EU6:EU;EV6:EV;EW6:EW;EX6:EX;EY6:EY;EZ6:EZ;FA6:FA;FB6:FB;FC6:FC;FD6:FD;FE6:FE;FF6:FF;FG6:FG;FH6:FH}, “where Col1 <>’’”))

There must be a cleaner way to do this with built-in functions without running into 50k character limit. If you know it - my DMs are open.

5 Custom formula in filter view

I’m only including this here because I often forget how to do this myself. This has nothing to do with filter() function. And everything to do with this “Create a filter” button that gives you a custom filter view.

Inside this filter view, instead of manually selecting each column you want to filter and set the value (like DR > 25, organic traffic > 1000) you can actually just select “Filter by condition” >> “Custom formula is” and write down your formula.

Did you enjoy this?

Leave your email and I'll let you know when new articles are published. (not really, this form is not connected to anything atm. But I'll get a notification that you "subscribed" 😅)

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.