Google Sheets cheat sheet
Tags: Programming, Excel, Google Spreadsheets, Excel Tutorial

This is a carefully curated formula sheet for google sheets. This article will be updated with more formulas from time to time.

You can start a new google spreadsheet by running sheets.new in your browser.

List of Formulas:

1) IF : This check for a logical expression and returns a value if the condition is met or not. Eg =if(a1>b1,true,false).

2) IFS: This checks for multiple logical expressions eg =IFS(a1>b1, “Okay”, a1=b1, “not okay”) . If you want every other cell that doesn’t meet any of these conditions to return a particular value, simply do =IFS(a1>b1, “Okay”, a1=b1, “not okay”, TRUE, “hmmm”). Adding the keyword TRUE in an IFS statement is how to add else.

3)Sumif: This accepts three parameters; The range, the condition and then the range to be summed . Eg =sumif(a1:a10, “good”, b1:b10). This checks the range a1:a10 for the text good, then sums the range b1:b10 that met the criteria.

4) Sumifs: These checks for multiple logical expressions in the following format; the sum range, criteria 1 range, the condition, the condition 2 range, the condition…. Eg =sumifs(A1:A3, B1:B3, “>10”,C1:C3,”boy”)

5) Countif: Counts the number of cells that meets a particular condition. =countif(a1:a3, “>100”)

6) Countifs:Counts the number of cells that meets several conditions =countifs(a1:a10,”>5”, b1:b10, “west”)

7)Iferror: When you run a formula and some cells don’t meet the condition , google sheet returns #N/A or a bunch of other errors, if you are like me and do not like weird text in your sheet you can always do =iferror(ifs(write your expression), “does not exist”). Iferror works with any formula, this is especially useful when dealing with vlookup and hlookup

8) Vlookup: If you want to retrieve data from a particular table. It searches vertically using a search key . eg =vlookup(b2,Sheet1!A1:D50,3,false) . B2 is the search key(value) to look for in the first column, Sheet1!A1:D50 is the range where data we want to lookup is, 3 is the index the column we want to return is, by default the column that has the search key has to be the first column, so in our example we are going to return any matching value in the column C. False is because we want an exact match by default the value is set at True which means an approximate church.

9) Vlookup for arrays: If you want to return multiple values you can do =arrayformula(vlookup(b2,Sheet1!A1:D50,{2;3;5},false)), you can also do =arrayformla(vlooup(b2,Shee1!A1:D50,row(2:7),false))

10) Hlookup: This is similar to vlooup but it searches horizontally. =hlookup(c1,Sheet1!A1:D50,3,false).

11)hlookup for arrays: you want to return multiple values you can do =arrayformula(vlookup(a1,Sheet1!A1:D50,{2;3;5},false)), you can also do =arrayformla(vlooup(a1,Sheet1!A1:D50,row(2:7),false))

12) Absolute and relative referencing: If you want to make a particular cell to remain constant you will simply do $b$2 so this way this particular cell will remain constant in our formula. If we want a relative reference then do $b2,this will keep the column B constant while row 2 keeps changing.

you want to return multiple values you can do =arrayformula(vlookup(b2,Sheet1!A1:D50,{2;3;5},false)), you can also do =arrayformla(vlooup(b2,Shee1!A1:D50,row(2:7),false))

13)minus: This is used to subtract one value from another. =minus(b2,a2)

14) sum : This is used to add two or more values. =sum(a2,b2)

15) index: This is used to copy data from one sheet to another sheet. =index(Sheet1!A1:D50). Optional argument is to add the row and column to return a particular value from a cell eg index(Sheet1!A1:D50,2,1) this will select the value in the second row and first column

16) Match: This searches a single row or column for a search key and returns the index in which the value can be found. =match(a1, a2:f2, 0) The first argument is the search key(the value we are looking for), the next argument is the range , and the last argument is so that it returns an exact match.

17) Combining match and index: Instead of ’hardcoding’ the row and column you want to return you can combine these two functions to dynamically return the value we want . =index(Sheet1!A:A, match(A2,Sheet1!B1:B10,0)). This differs from doing a vlookup because your search key does not have to be the first column.

18) Rank: Returns the rank of a specified value in a dataset. =rank(a2, a1:a10, false)

19) Rank average:This is similar to rank. However, If there is more than one entry of the same value it returns the average rank. = rank.avg(a2, a1:a10, false)

20) Image: This inserts an image into a cell . =image(‘image url’, height, width)

21) Filter : This filters a range based on a condition . eg =filter(a2:a10, a2:a10 >100), this will filter away cells that do not meet the condition(s)

22) Transpose : This transposes the row and column of an array. = transpose(a1:d10)

23) sort: This sorts the data. =sort(a2:d5, 2, false). The first parameter is the range, the ‘2’ means that the column we want to sort is the second column, false means that we want the values sorted in descending order. You can try making it true

24) unique: This removes duplicate values and then it returns the values. =unique(a2:a10) if there are any duplicate values, this will remove them

25) combining sort and unique: You can combine sort and unique at the same time, =sort(unique(B2:B5),1,false)

26) Concat : This is used to concatenate two cells or a cell with a word . eg concat (B2, “good”) . This will add whatever value is in B2 with the word good.

If you enjoyed reading this please clap and share this article!

You can follow me on twitter