Google Sheets Formula Cheat Sheet
A searchable, printable Google Sheets reference — QUERY, ARRAYFORMULA, IMPORTRANGE, FILTER, lookups, dates and keyboard shortcuts. Free.
QUERY function
12=QUERY(A1:D, "SELECT A, B")
=QUERY(A1:D, "SELECT * WHERE C > 100")
=QUERY(A1:D, "SELECT A WHERE B = 'Paid'")
=QUERY(A1:D, "SELECT A WHERE B CONTAINS 'inc'")
=QUERY(A1:D, "SELECT A, SUM(C) GROUP BY A")
=QUERY(A1:D, "SELECT A, COUNT(B) GROUP BY A PIVOT D")
=QUERY(A1:D, "SELECT * ORDER BY C DESC LIMIT 10")
=QUERY(A1:D, "SELECT * WHERE A IS NOT NULL")
=QUERY(A1:D, "SELECT A WHERE D >= date '2026-01-01'")
=QUERY(A1:D, "SELECT A LABEL A 'Name'")
=QUERY({Sheet1!A:C; Sheet2!A:C}, "SELECT *")
=QUERY(A1:D, "SELECT Col1, Col3", 1)
ARRAYFORMULA & arrays
11=ARRAYFORMULA(A2:A * B2:B)
=ARRAYFORMULA(IF(A2:A="", "", A2:A * 1.2))
={A1:A5; B1:B5}
={A1:A5, B1:B5}
=SEQUENCE(10)
=SEQUENCE(3, 4, 0, 5)
=FLATTEN(A1:C5)
=TRANSPOSE(A1:A10)
=BYROW(A2:C10, LAMBDA(r, SUM(r)))
=MAP(A2:A, LAMBDA(x, x * 2))
=SCAN(0, A2:A, LAMBDA(acc, x, acc + x))
IMPORT functions
10=IMPORTRANGE("sheet_url", "Data!A1:C100")
IMPORTRANGE: click "Allow access" once
=QUERY(IMPORTRANGE(url, "A:C"), "SELECT Col1")
=IMPORTXML(url, "//h2")
=IMPORTXML(url, "//a/@href")
=IMPORTHTML(url, "table", 1)
=IMPORTHTML(url, "list", 2)
=IMPORTDATA("https://x.com/data.csv")
=IMPORTFEED(rss_url, "items title", TRUE, 5)
Imports refresh ~every hour, not live
FILTER / SORT / UNIQUE
11=FILTER(A2:C, C2:C > 100)
=FILTER(A2:C, (B2:B="Paid") * (C2:C>0))
=FILTER(A2:C, (B2:B="A") + (B2:B="B"))
=SORT(A2:C, 3, FALSE)
=SORT(A2:C, 1, TRUE, 2, FALSE)
=SORTN(A2:C, 5, 0, 3, FALSE)
=UNIQUE(A2:A)
=UNIQUE(A2:C)
=SORT(UNIQUE(FILTER(A2:A, A2:A<>"")))
=COUNTA(UNIQUE(A2:A))
=RANDARRAY(5, 1)
Lookups
10=VLOOKUP(E2, A2:C100, 3, FALSE)
=VLOOKUP(E2, A:C, 2, TRUE)
=XLOOKUP(E2, A2:A, C2:C)
=XLOOKUP(E2, A2:A, C2:C, "Not found")
=XLOOKUP(E2, A2:A, C2:C, , , -1)
=INDEX(C2:C, MATCH(E2, A2:A, 0))
=INDEX(A2:F, MATCH(x, A2:A, 0), MATCH(y, A1:F1, 0))
=HLOOKUP(E1, A1:F3, 2, FALSE)
=ARRAYFORMULA(VLOOKUP(E2:E, A:C, 3, FALSE))
=IFERROR(VLOOKUP(...), "—")
Text functions
13=SPLIT(A2, ",")
=JOIN(", ", A2:A10)
=TEXTJOIN(", ", TRUE, A2:A10)
=REGEXEXTRACT(A2, "\d+")
=REGEXEXTRACT(A2, "@(.+)$")
=REGEXREPLACE(A2, "\s+", " ")
=REGEXMATCH(A2, "^https?://")
=LEFT(A2, 5) / =RIGHT(A2, 3)
=MID(A2, 3, 4)
=TRIM(A2), =LOWER(A2), =PROPER(A2)
=SUBSTITUTE(A2, "old", "new")
=LEN(A2)
=CONCATENATE(A2, " ", B2) or A2 & " " & B2
Date & time
12=TODAY() / =NOW()
=DATE(2026, 7, 27)
=DATEDIF(A2, B2, "D")
=EDATE(A2, 3)
=EOMONTH(A2, 0)
=WEEKDAY(A2, 2)
=WORKDAY(A2, 10)
=NETWORKDAYS(A2, B2)
=TEXT(A2, "yyyy-mm-dd")
=DATEVALUE("2026-07-27")
=A2 + 7
=ISOWEEKNUM(A2)
Conditional logic
10=IF(A2 > 100, "High", "Low")
=IFS(A2>90, "A", A2>80, "B", TRUE, "C")
=SWITCH(A2, "US", "$", "EU", "€", "?")
=AND(A2>0, B2<10) / =OR(...)
=NOT(ISBLANK(A2))
=IFERROR(A2/B2, 0)
=IFNA(VLOOKUP(...), "missing")
=ISNUMBER(A2), =ISTEXT(A2), =ISDATE(A2)
=LAMBDA(x, x * 2)(A2)
=LET(t, A2*B2, t + t*0.2)
Google-only functions
11=GOOGLEFINANCE("GOOG")
=GOOGLEFINANCE("GOOG", "pe")
=GOOGLEFINANCE("GOOG", "price", TODAY()-365, TODAY())
=GOOGLEFINANCE("CURRENCY:USDEUR")
=GOOGLETRANSLATE(A2, "en", "fr")
=DETECTLANGUAGE(A2)
=SPARKLINE(A2:A30)
=SPARKLINE(A2:A13, {"charttype","column"})
=SPARKLINE(A2, {"charttype","bar";"max",100})
=IMAGE("https://x.com/logo.png")
=HYPERLINK(url, "Open")
Aggregation (SUMIFS & co.)
10=SUMIF(A2:A, "Paid", C2:C)
=SUMIFS(C2:C, A2:A, "Paid", B2:B, ">100")
=COUNTIF(A2:A, "Paid")
=COUNTIFS(A2:A, "Paid", B2:B, ">=10")
=AVERAGEIFS(C2:C, A2:A, "Paid")
=MAXIFS(C2:C, A2:A, "Paid")
=SUMIFS(C:C, D:D, ">="&E1, D:D, "<"&F1)
=SUMPRODUCT((A2:A="X") * C2:C)
=COUNTIF(A2:A, "*inc*")
=SUBTOTAL(109, C2:C100)
Keyboard shortcuts
12Ctrl+/ (Cmd+/)
Ctrl+; / Ctrl+Shift+;
Ctrl+D / Ctrl+R
Ctrl+Enter
Ctrl+Shift+V
Ctrl+Arrow
Ctrl+Space / Shift+Space
Alt+Shift+= (rows/cols selected)
F4
F2
Ctrl+Alt+M
Alt+Down (on a filtered header)
Apps Script one-liners
12Extensions > Apps Script
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName("Data");
sheet.getRange("A1").setValue("Hi");
const rows = sheet.getDataRange().getValues();
sheet.appendRow(["a", "b", new Date()]);
sheet.getRange(1,1,data.length,data[0].length).setValues(data);
function onEdit(e) { ... }
SpreadsheetApp.getUi().alert("Done");
UrlFetchApp.fetch(url).getContentText();
Triggers menu > Time-driven
function DOUBLE(x) { return x * 2; }
No entry matches “:q”.
About Google Sheets Formula Cheat Sheet
This Google Sheets formula cheat sheet collects the functions that make Sheets worth using into one searchable page: the QUERY function, ARRAYFORMULA and arrays, the IMPORT family, FILTER, SORT and UNIQUE, lookups, text functions, date and time, conditional logic, Google-only functions, aggregation with SUMIFS and friends, keyboard shortcuts, and a few Apps Script one-liners.
It leads with the formulas that have no Excel equivalent — QUERY with its SQL-like syntax, ARRAYFORMULA to apply a formula down a whole column, IMPORTRANGE, IMPORTHTML and GOOGLEFINANCE — then covers the everyday VLOOKUP, XLOOKUP, INDEX/MATCH, TEXTJOIN, SUMIFS and date maths.
The sheet is free and client-side: filter rows live with the search box, hop between sections with the sticky table of contents, copy any formula with one click and print the page as a desk reference.
How to use Google Sheets Formula Cheat Sheet
- Skim the sections, from QUERY function and ARRAYFORMULA through Lookups to Apps Script one-liners.
- Search for a function name such as QUERY, FILTER or XLOOKUP to filter every row live.
- Jump to Google-only functions for the formulas that do not exist in Excel.
- Click a formula or its copy icon to copy it, then paste it into a cell and edit the ranges.
- Print the sheet for an offline Google Sheets reference.