Range:
Copy down / drag down: right-bottom cell corner, drag or double click (ctrl-shift-enter)
Formula Bar: activate to show helps on formula, drag to enlarge, ctrl-enter to break lines
If() - test condition, choose between value for true & value for false
ifs() - save from nested if, multiple condition multiple values
and(cond1, cond2) or(cond1, cond2)
sumif(): sum only when condition is met
sumifs(): sum only when multiple condition is met
Used in formulas such as "countif":
count() - just count the numbers
counta() - count everything not blank
countblank()
countif() - count, if (criterion like ">10")
countifs() - multiple conditions
countunique() - count unique values
Use data validation to make a drop-down menu
To make a "second level drop-down" dependent on a first drop-down, use something like 'filter' to populate the data for second drop-down into some area first
Custom formula: start with a "="; for example require a column unique
Custom format:
Conditional format:
Vlookup (look down a RANGE, find exact/drop back, then right):
HLOOKUP (look right a RANGE, find exact / drop back, then down)
LOOKUP (look up key in a ROW OR COLUMN, find, then retrieve the value from another ROW OR COLUMN)
index(range, row, column), returns a cell REFERENCE (not just the value):
Usage:
=A1:index(A:A,counta(A:A))
Take a text reference ("Sheet!A1:B5") and return the actual cell/range
Usage:
Offset: take a cell as starting point, travels offset rows / columns, then return the cell or a range of given rows / columns
Just return the first cell. Can also use "+". e..g. "+filter(...)"
Return the coordination & width/height of range
Basic:
Wildcard: "*" for wildcard, "?" for single character
Filter rows of a given range and only leave those satisfies a condition (example "B4:B>10
", specify a column), return a FILTERED AREA
Condition:
Basic: query(range, query, header) - header is just number of header rows
Range:
Query language (Google Visualization API Query Language https://developers.google.com/chart/interactive/docs/querylanguage):
Converts TRUE/FALSE to 1 & 0
Two or more ranges (second one can be locked), first each cell * corresponding cell, then SUM
Easier than a "product" column then SUM
Also since TRUE/FALSE as 1/0 (tip: --(TRUE) converts to 1,0), the product would be AND, so SUMPRODUCT can be used as SUMIFS (but not readable, so not encouraged)
{}:
ArrayFormula (ctrl/command+enter):
IMPORTRANGE - Able to bring data from another Google Sheet into current one:
IMPORTHTML - grab data from web page table/list etc., needs some experiment and luck...but can be powerful (like copy paste)
IMPORTXML - grab xml from url, then use xquery! Able to do some 'mass query' if url is from a column... powerful
(Syntax reference) https://github.com/google/re2/blob/master/doc/syntax.txt
REGEXMCH - match and return true/false
REGEXEXTRACT - extract pattern from string:
REGEXREPLACE - replace pattern in string
Date is just a formatting. Fundamentally stored as a serial number (1 = 1 day, time: decimals)
Literal: date '2001-12-31'
int() - remove time, leave only date
date(year, month, day) - convert to date number
now() - now
today() - today without time
eomonth() - last day of month of a target date's previous/current/after month (specified), to calculate start of month, calculate the last day of previous month and +1
month(), year() - the month/year number of...
"Q"& - concatenate
Fun little charts in single cell to show trends
Return the nth smallest/largest
Transpose: row/column transpose (rows to columns and vice versa)
MMULT: matrix multiply
Frequency: Take a range of values, and another range of steps, calculate the frequency of values fall into each step
Rank: the rank position of a value in a range of values
Sort: a range by values in a column
SORTN: get max n rows.
Like SUM() but:
Correct way to get data from pivot table (which has variable size)
Not just to URL can also to cell, range of sheet