Post/Code

HomeAboutUsesNow

Google Sheets Cheat Sheet.

While I have been a longtime user of Google Sheets. My usage has not been very deep. Mostly just making lists of things I like to keep track of. However, with the discovery of the wonderful app called Glide, my usage of Google Sheets has increased dramatically!

Filter.

Filter is a very useful formula enabling you to filter your view of data. For example:

=filter(SheetName!A:E,Sheet!E:E=TRUE)

This will pull data in from columns A to E in SheetName and will then display all items that have a value of TRUE in Column E of that same sheet.

Unique.

Unique enables you to pull out unique values from a list of values. For example:

=UNIQUE(SheetName!I2:I)

This will pull all unique values in from SheetName Column I from rows 2 to as many rows as I contains.

Sort.

Sort lets you, well, sort data in your sheet. I tend to use it to sort data from another sheet. For example:

=SORT(SheetName!A2:F, 4, true)

This will sort data from SheetName in the range of Columns A to F.

IF.

If lets you specify a condition, for example:

=IF(D2=1,D2 & " spot available", D2 & " spots available")

The above will check whether D2 is equal to 1, if so it will print '1 spot available', else it will print the value in D2 ' spots available'.

QUERY.

Query is a very powerful functions, essentially, it enables you to import data from another sheet and then use SQL to query that data. For example:

=query({Vacancies2019!A2:F;Vacancies2020!A2:F;Vacancies2021!A2:F}, "Select * where Col4>0 or Col5>0 or Col6>0")

In the above, data from 3 separate sheets is pulled in. From that pool of data, all the information is pulled in where the values in Column 4, 5 or 6 are greater than 0.

IMPORTFEED.

IMPORTFEED enables you to pull in RSS feed information into your Google Sheet.

=IMPORTFEED("https://wordpress.org/news/feed/",,TRUE,5)

This will pull in 5 itesm from the official WordPress RSS news feed.

Parameters:

  1. The URL you want to pull in.
  2. You can specify the query or fields you want to pull in, this is by defaults set to 'items' which pulls in the feed line items.
  3. A boolean to say whether you want to pull in headers/headings.
  4. Number of items you would like to pull in.

IMPORTXML.

IMPORTXML is another very useful function which enables you to pull in data from an XML source (eg. podcast feed) and specify the data you want to retrieve via XPATH queries.

=IMPORTXML("your-rss-feed-here","//enclosure/@url")

The above will extract the URL property from the <enclosure> tag, thus providing the direct link to the .mp3 file. Notably, this .mp3 file will not be provided via the IMPORTFEED formula, that will just provide the podcast host url for the feed.

It is notable that you can actually use IMPORTXML to pull in data from any HTML page and use XPATH to extract data from it.

You can find out more about XPATH here.

To be continued...