I... I don't know why I made this exactly. One day, I thought, "Would I be able to build spreadsheet software?" And then I did it.
You can find the application: https://spreadsheet.robinmalfait.com
- You can write normal text in a cell
- You can write a number in a cell
- This is actual text, but will be coerced to a number
- You can write a formula in a cell
- Formulas are prefixed with
=
- Formulas are prefixed with
Once you write a formula, you will get some syntax highlighting.
Mathematical Operators
| Operator | Description |
|---|---|
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
^ |
Exponentiation |
( and ) |
Parentheses |
Comparison Operators
| Operator | Description |
|---|---|
== |
Equal |
!= |
Not equal |
> |
Greater than |
< |
Less than |
>= |
Greater than or equal |
<= |
Less than or equal |
There are 123 built-in functions available.
- Date functions
- ADD_DAYS(date: DATETIME, days: NUMBER)
- ADD_HOURS(date: DATETIME, hours: NUMBER)
- DAY(date: DATETIME)
- HOUR(date: DATETIME)
- MINUTE(date: DATETIME)
- MONTH(date: DATETIME)
- NOW()
- SECOND(date: DATETIME)
- SUB_DAYS(date: DATETIME, days: NUMBER)
- SUB_HOURS(date: DATETIME, hours: NUMBER)
- TIME()
- TODAY()
- YEAR(date: DATETIME)
- Engineering functions
- BIN2DEC(value: STRING | NUMBER)
- BIN2HEX(value: STRING | NUMBER)
- BIN2OCT(value: STRING | NUMBER)
- DEC2BIN(value: NUMBER)
- DEC2HEX(value: NUMBER)
- DEC2OCT(value: NUMBER)
- HEX2BIN(value: STRING | NUMBER)
- HEX2DEC(value: STRING | NUMBER)
- HEX2OCT(value: STRING | NUMBER)
- OCT2BIN(value: STRING | NUMBER)
- OCT2DEC(value: STRING | NUMBER)
- OCT2HEX(value: STRING | NUMBER)
- Logic functions
- AND(...expressions: T)
- BIT_AND(lhs: NUMBER, rhs: NUMBER)
- BIT_LSHIFT(value: NUMBER, amount: NUMBER)
- BIT_OR(lhs: NUMBER, rhs: NUMBER)
- BIT_RSHIFT(value: NUMBER, amount: NUMBER)
- BIT_XOR(lhs: NUMBER, rhs: NUMBER)
- FALSE()
- IF(test: BOOLEAN, consequent: T, alternate: T)
- IF_ERROR(value: T, fallback: T)
- NOT(value: BOOLEAN)
- OR(...expressions: T)
- SWITCH(value: T, ...cases: T, default?: T)
- TRUE()
- Lookup functions
- Math functions
- ABS(x: NUMBER)
- ACOS(x: NUMBER)
- ACOSH(x: NUMBER)
- ADD(x: NUMBER, y: NUMBER)
- ASIN(x: NUMBER)
- ASINH(x: NUMBER)
- ATAN(x: NUMBER)
- ATAN2(y: NUMBER, x: NUMBER)
- ATANH(x: NUMBER)
- CBRT(x: NUMBER)
- CEIL(x: NUMBER)
- CLZ32(x: NUMBER)
- COS(x: NUMBER)
- COSH(x: NUMBER)
- DIVIDE(x: NUMBER, y: NUMBER)
- EXP(x: NUMBER)
- FLOOR(x: NUMBER)
- IMUL(x: NUMBER, y: NUMBER)
- LOG(x: NUMBER)
- LOG10(x: NUMBER)
- MOD(x: NUMBER, y: NUMBER)
- MULTIPLY(x: NUMBER, y: NUMBER)
- PI()
- POWER(x: NUMBER, y: NUMBER)
- PRODUCT(...values: T)
- ROUND(x: NUMBER, places?: NUMBER)
- SIN(x: NUMBER)
- SINH(x: NUMBER)
- SQRT(x: NUMBER)
- SUBTRACT(x: NUMBER, y: NUMBER)
- SUM(...values: T)
- TAN(x: NUMBER)
- TANH(x: NUMBER)
- TAU()
- TRUNC(x: NUMBER)
- Sequence functions
- Statistical functions
- Text functions
- CHAR_CODE_AT(value: STRING, index: NUMBER)
- CONCAT(...values: T)
- FIND_FIRST(haystack: STRING, ...needles: STRING)
- FIND_FIRST_INDEX(haystack: STRING, ...needles: STRING)
- FIND_LAST(haystack: STRING, ...needles: STRING)
- FIND_LAST_INDEX(haystack: STRING, ...needles: STRING)
- JOIN(delimiter: STRING, ...values: T)
- LEN(value: STRING)
- LOWER(value: T)
- PAD_END(value: STRING | NUMBER, length: NUMBER, character: STRING | NUMBER)
- PAD_START(value: STRING | NUMBER, length: NUMBER, character: STRING | NUMBER)
- REPLACE_ALL(haystack: STRING, ...zip?: STRING | NUMBER)
- SPLIT(value: STRING, delimiter: STRING)
- TEXT_CHUNK(value: STRING, length: NUMBER)
- TEXT_SLICE(value: STRING, start: NUMBER, end?: NUMBER)
- TEXT_WINDOW(value: STRING, length: NUMBER)
- TRIM(value: STRING)
- UPPER(value: T)
- Type functions
- Intrinsics
Add a certain amount of days to a date.
date: The date to add the days to.days: The number of days to add.
// Dependencies:
=TODAY() // 2013-01-21
=ADD_DAYS(TODAY(), 7)
// 2013-01-28Add a certain amount of hours to a date.
date: The date to add the hours to.days: The number of hours to add.
// Dependencies:
=NOW() // 2013-01-21 08:15:20
=ADD_HOURS(NOW(), 8)
// 2013-01-21 16:15:20The current day of the given date.
date: The date to extract the current day from.
// Dependencies:
=TODAY() // 2013-01-21
=DAY(TODAY())
// 21The current hour of the given date.
date: The date to extract the current hour from.
// Dependencies:
=NOW() // 2013-01-21 08:15:20
=HOUR(NOW())
// 8The current minute of the given date.
date: The date to extract the current minute from.
// Dependencies:
=NOW() // 2013-01-21 08:15:20
=MINUTE(NOW())
// 15The current month of the given date. The month is 1-indexed.
date: The date to extract the current month from.
// Dependencies:
=TODAY() // 2013-01-21
=MONTH(TODAY())
// 1The current date and time represented as a datetime.
=NOW()
// 2013-01-21 08:15:20The current second of the given date.
date: The date to extract the current seconds from.
// Dependencies:
=NOW() // 2013-01-21 08:15:20
=SECOND(NOW())
// 20Subtract a certain amount of days from a date.
date: The date to subtract the days from.days: The number of days to subtract.
// Dependencies:
=TODAY() // 2013-01-21
=SUB_DAYS(TODAY(), 7)
// 2013-01-14Subtract a certain amount of hours from a date.
date: The date to subtract the hours from.days: The number of hours to subtract.
// Dependencies:
=NOW() // 2013-01-21 08:15:20
=SUB_HOURS(NOW(), 8)
// 2013-01-21 00:15:20The current time represented as a datetime.
=TIME()
// 08:15:20The current date represented as a datetime.
=TODAY()
// 2013-01-21The current year of the given date.
date: The date to extract the current year from.
// Dependencies:
=TODAY() // 2013-01-21
=YEAR(TODAY())
// 2013Convert a binary number to decimal
value: The binary number to convert.
=BIN2DEC(1101)
// 13Convert a binary number to hexadecimal
value: The binary number to convert.
=BIN2HEX(1101)
// "d"Convert a binary number to octal
value: The binary number to convert.
=BIN2OCT(111111111)
// "777"Convert a decimal number to binary
value: The decimal number to convert.
=DEC2BIN(13)
// "1101"Convert a decimal number to binary
value: The decimal number to convert.
=DEC2HEX(13)
// "d"Convert a decimal number to binary
value: The decimal number to convert.
=DEC2OCT(13)
// "15"Convert a decimal number to binary
value: The hexadecimal number to convert.
=HEX2BIN("FF")
// "11111111"=HEX2BIN("1234")
// "1001000110100"Convert a decimal number to binary
value: The hexadecimal number to convert.
=HEX2DEC("FF")
// 255=HEX2DEC("1234")
// 4660Convert a decimal number to binary
value: The hexadecimal number to convert.
=HEX2OCT("FF")
// "377"=HEX2OCT("1234")
// "11064"Convert a decimal number to binary
value: The octal number to convert.
=OCT2BIN(777)
// "111111111"Convert an octal number to hexadecimal
value: The octal number to convert.
=OCT2DEC(777)
// 511Convert an octal number to hexadecimal
value: The octal number to convert.
=OCT2HEX(777)
// "1ff"Returns true if all conditions are true.
expressions: The conditions to evaluate.
// Dependencies:
=TRUE() // TRUE
=AND(TRUE(), TRUE(), TRUE())
// TRUE// Dependencies:
=TRUE() // TRUE
=FALSE() // FALSE
=AND(TRUE(), TRUE(), FALSE())
// FALSEReturns the bitwise AND of two numbers.
lhs: The left hand side of the operation.rhs: The right hand side of the operation.
=BIT_AND(5, 3)
// 1Returns the bitwise left shift of a number.
value: The number to shift.amount: The number of bits to shift.
=BIT_LSHIFT(5, 3)
// 40Returns the bitwise OR of two numbers.
lhs: The left hand side of the operation.rhs: The right hand side of the operation.
=BIT_OR(5, 3)
// 7Returns the bitwise left shift of a number.
value: The number to shift.amount: The number of bits to shift.
=BIT_RSHIFT(128, 2)
// 32Returns the bitwise XOR of two numbers.
lhs: The left hand side of the operation.rhs: The right hand side of the operation.
=BIT_XOR(5, 3)
// 6The boolean value false.
=FALSE()
// FALSEReturns one value if a condition is true and another value if it is false.
test: The condition to evaluate.consequent: The value to return if the condition is true.alternate: The value to return if the condition is false.
// Dependencies:
=TRUE() // TRUE
=IF(TRUE(), "huge if true", "huge if false")
// "huge if true"// Dependencies:
=FALSE() // FALSE
=IF(FALSE(), "huge if true", "huge if false")
// "huge if false"Returns one value if a condition is an error and another value if it is not.
value: The value to test against an error.fallback: The value to return if the condition is an error.
=IF_ERROR(123 / 1, 0)
// 123=IF_ERROR(123 / 0, 0)
// 0Returns true if the condition is false.
value: The condition to negate.
// Dependencies:
=TRUE() // TRUE
=NOT(TRUE())
// FALSE// Dependencies:
=FALSE() // FALSE
=NOT(FALSE())
// TRUEReturns true if any condition is true.
expressions: The conditions to evaluate.
// Dependencies:
=TRUE() // TRUE
=OR(TRUE(), TRUE(), TRUE())
// TRUE// Dependencies:
=TRUE() // TRUE
=FALSE() // FALSE
=OR(TRUE(), TRUE(), FALSE())
// TRUEReturns the matching value for the first condition that is true.
value: The value to test against the conditions.cases: The cases and the values to return.
=SWITCH(1, 1, "st", 2, "nd", 3, "rd", "th")
// "st"=SWITCH(2, 1, "st", 2, "nd", 3, "rd", "th")
// "nd"=SWITCH(3, 1, "st", 2, "nd", 3, "rd", "th")
// "rd"=SWITCH(4, 1, "st", 2, "nd", 3, "rd", "th")
// "th"=SWITCH(5, 1, "st", 2, "nd", 3, "rd", "th")
// "th"The boolean value true.
=TRUE()
// TRUELookup a value in a range, and return the value in the same position from another range.
// Dependencies:
=RANGE(1, 3)
// ┌───┬───┬───┐
// │ │ A │ B │
// ├───┼───┼───┤
// │ 1 │ 1 │ 2 │
// └───┴───┴───┘
=RANGE(4, 6)
// ┌───┬───┬───┐
// │ │ A │ B │
// ├───┼───┼───┤
// │ 1 │ 4 │ 5 │
// └───┴───┴───┘
=LOOKUP(2, RANGE(1, 3), RANGE(4, 6))
// 5The ABS function.
x: A number.
=ABS(1)
// 1The ACOS function.
x: A number.
=ACOS(1)
// 0The ACOSH function.
x: A number.
=ACOSH(1)
// 0Add two numbers.
x: The first number.y: The second number.
=ADD(1, 2)
// 3The ASIN function.
x: A number.
=ASIN(1)
// 1.5707963267948966The ASINH function.
x: A number.
=ASINH(1)
// 0.881373587019543The ATAN function.
x: A number.
=ATAN(1)
// 0.7853981633974483The angle (in radians) from the X axis to a point.
y: A numeric expression representing the cartesian y-coordinate.x: A numeric expression representing the cartesian x-coordinate.
=ATAN2(1, 1)
// 0.7853981633974483The ATANH function.
x: A number.
=ATANH(1)
// InfinityThe CBRT function.
x: A number.
=CBRT(1)
// 1Returns the smallest integer greater than or equal to its numeric argument.
x: A numeric expression.
=CEIL(1.5)
// 2The CLZ32 function.
x: A number.
=CLZ32(1)
// 31The COS function.
x: A number.
=COS(1)
// 0.5403023058681398The COSH function.
x: A number.
=COSH(1)
// 1.5430806348152437Returns the result of dividing two numbers.
x: The dividend.y: The divisor.
=DIVIDE(6, 3)
// 2The EXP function.
x: A number.
=EXP(1)
// 2.718281828459045Returns the greatest integer less than or equal to its numeric argument.
x: A numeric expression.
=FLOOR(1.5)
// 1The result of 32-bit multiplication of two numbers.
x: First numbery: Second number
=IMUL(1, 2)
// 2The LOG function.
x: A number.
=LOG(1)
// 0The LOG10 function.
x: A number.
=LOG10(1)
// 0Returns the remainder of the division of two numbers.
x: The dividend.y: The divisor.
=MOD(5, 2)
// 1Multiply two numbers.
x: The first number.y: The second number.
=MULTIPLY(2, 3)
// 6The number π.
=PI()
// 3.141592653589793Returns the value of a base expression taken to a specified power.
x: The base value of the expression.y: The exponent value of the expression.
=POWER(2, 3)
// 8Returns the product of all arguments.
values: The numbers to multiply.
=PRODUCT(2, 3, 4)
// 24Rounds a number to a certain number of decimal places.
value: The number to round.places: The number of decimal places to round to.
=ROUND(1.5)
// 2// Dependencies:
=PI() // 3.141592653589793
=ROUND(PI(), 2)
// 3.14The SIN function.
x: A number.
=SIN(1)
// 0.8414709848078965The SINH function.
x: A number.
=SINH(1)
// 1.1752011936438014The SQRT function.
x: A number.
=SQRT(1)
// 1Subtract two numbers.
x: The first number.y: The second number.
=SUBTRACT(2, 1)
// 1Returns the sum of all arguments.
values: The numbers to sum.
=SUM(1, 2, 3)
// 6The TAN function.
x: A number.
=TAN(1)
// 1.557407724654902The TANH function.
x: A number.
=TANH(1)
// 0.7615941559557649The number τ.
=TAU()
// 6.283185307179586The TRUNC function.
x: A number.
=TRUNC(1)
// 1A sequence of ascii letters from a through z and A through Z.
=ASCII_LETTERS()
// ┌───┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │ K │ L │ M │ N │ O │ P │ Q │ R │ S │ T │ U │ V │ W │ X │ Y │ Z │ [ │ \ │ ] │ ^ │ _ │ ` │ a │ b │ c │ d │ e │ f │ g │ h │ i │ j │ k │ l │ m │ n │ o │ p │ q │ r │ s │ t │
// ├───┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
// │ 1 │ "a" │ "b" │ "c" │ "d" │ "e" │ "f" │ "g" │ "h" │ "i" │ "j" │ "k" │ "l" │ "m" │ "n" │ "o" │ "p" │ "q" │ "r" │ "s" │ "t" │ "u" │ "v" │ "w" │ "x" │ "y" │ "z" │ "A" │ "B" │ "C" │ "D" │ "E" │ "F" │ "G" │ "H" │ "I" │ "J" │ "K" │ "L" │ "M" │ "N" │ "O" │ "P" │ "Q" │ "R" │ "S" │ "T" │ "U" │ "V" │ "W" │ "X" │ "Y" │ "Z" │
// └───┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘A sequence of ascii letters from a through z
=ASCII_LETTERS_LOWERCASE()
// ┌───┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │ K │ L │ M │ N │ O │ P │ Q │ R │ S │ T │ U │ V │ W │ X │ Y │ Z │
// ├───┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
// │ 1 │ "a" │ "b" │ "c" │ "d" │ "e" │ "f" │ "g" │ "h" │ "i" │ "j" │ "k" │ "l" │ "m" │ "n" │ "o" │ "p" │ "q" │ "r" │ "s" │ "t" │ "u" │ "v" │ "w" │ "x" │ "y" │ "z" │
// └───┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘A sequence of ascii letters from A through Z
=ASCII_LETTERS_UPPERCASE()
// ┌───┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │ K │ L │ M │ N │ O │ P │ Q │ R │ S │ T │ U │ V │ W │ X │ Y │ Z │
// ├───┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
// │ 1 │ "A" │ "B" │ "C" │ "D" │ "E" │ "F" │ "G" │ "H" │ "I" │ "J" │ "K" │ "L" │ "M" │ "N" │ "O" │ "P" │ "Q" │ "R" │ "S" │ "T" │ "U" │ "V" │ "W" │ "X" │ "Y" │ "Z" │
// └───┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘A sequence of the digits from 0 through 9.
=DIGITS()
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘A sequence of the digits from 0 through 9 and A through F.
=HEX_DIGITS()
// ┌───┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │ K │ L │ M │ N │ O │ P │ Q │ R │ S │ T │ U │ V │
// ├───┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
// │ 1 │ "0" │ "1" │ "2" │ "3" │ "4" │ "5" │ "6" │ "7" │ "8" │ "9" │ "a" │ "b" │ "c" │ "d" │ "e" │ "f" │ "A" │ "B" │ "C" │ "D" │ "E" │ "F" │
// └───┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘Create a matrix of size rows x cols. With an optional default value.
rows: The number of rows in the matrix.cols: The number of columns in the matrix.fill: The default value for each cell in the matrix.
=MATRIX(4, 5, 3)
// ┌───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │
// ├───┼───┼───┼───┼───┼───┤
// │ 1 │ 3 │ 3 │ 3 │ 3 │ 3 │
// ├───┼───┼───┼───┼───┼───┤
// │ 2 │ 3 │ 3 │ 3 │ 3 │ 3 │
// ├───┼───┼───┼───┼───┼───┤
// │ 3 │ 3 │ 3 │ 3 │ 3 │ 3 │
// ├───┼───┼───┼───┼───┼───┤
// │ 4 │ 3 │ 3 │ 3 │ 3 │ 3 │
// └───┴───┴───┴───┴───┴───┘A sequence of the digits from 0 through 7
=OCT_DIGITS()
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┘Generate a sequence of numbers from start to end.
=RANGE(3, 7)
// ┌───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │
// ├───┼───┼───┼───┼───┤
// │ 1 │ 3 │ 4 │ 5 │ 6 │
// └───┴───┴───┴───┴───┘=RANGE(10)
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘Transpose an array.
value: The array to transpose.
// Dependencies:
=DIGITS()
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
=TRANSPOSE(DIGITS())
// ┌────┬───┐
// │ │ A │
// ├────┼───┤
// │ 1 │ 0 │
// ├────┼───┤
// │ 2 │ 1 │
// ├────┼───┤
// │ 3 │ 2 │
// ├────┼───┤
// │ 4 │ 3 │
// ├────┼───┤
// │ 5 │ 4 │
// ├────┼───┤
// │ 6 │ 5 │
// ├────┼───┤
// │ 7 │ 6 │
// ├────┼───┤
// │ 8 │ 7 │
// ├────┼───┤
// │ 9 │ 8 │
// ├────┼───┤
// │ 10 │ 9 │
// └────┴───┘Returns the average of NUMBER arguments.
values: The values to compare.
=AVERAGE(1, 3, 2, 5, 4)
// 3Count the number of NUMBER arguments.
values: The values to count.
// Dependencies:
=TRUE() // TRUE
=COUNT(1, 2, TRUE(), "hello world", 3.2)
// 3Returns the largest NUMBER argument.
values: The values to compare.
=MAX(1, 3, 2, 5, 4)
// 5Returns the median of NUMBER arguments.
values: The values to compare.
=MEDIAN(1, 3, 2, 5, 4)
// 3Returns the smallest NUMBER argument.
values: The values to compare.
=MIN(5, 4, 1, 2, 3)
// 1Returns the mode of NUMBER arguments.
values: The values to compare.
=MODE(3, 2, 1, 3, 3, 4, 5, 8, 9, 1)
// 3Get the character code at a specific index in a string.
value: The string to get the character code from.index: The index of the character to get the character code from.
=CHAR_CODE_AT("ABC", 0)
// 65=CHAR_CODE_AT("ABC", 1)
// 66=CHAR_CODE_AT("ABC", 2)
// 67Concatenates multiple strings together.
values: The strings to concatenate.
=CONCAT("hello", " ", "world")
// "hello world"Returns the first needle found in the haystack.
haystack: The string to search in.needles: The strings to search for.
=FIND_FIRST("The quick brown fox jumps over the lazy dog", "fox", "dog")
// "fox"=FIND_FIRST("The quick brown fox jumps over the lazy dog", "dog", "fox")
// "fox"=FIND_FIRST("12345", "5", "4", "3", "2", "1")
// "1"// Dependencies:
=INTO(DIGITS()) // ERROR: INTO() can only be used inside of a function
=DIGITS()
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
=FIND_FIRST("321", INTO(DIGITS()))
// "3"Returns the position of the first needle found in the haystack.
haystack: The string to search in.needles: The strings to search for.
=FIND_FIRST_INDEX("The quick brown fox jumps over the lazy dog", "fox", "dog")
// 16=FIND_FIRST_INDEX("The quick brown fox jumps over the lazy dog", "dog", "fox")
// 16Returns the last needle found in the haystack.
haystack: The string to search in.needles: The strings to search for.
=FIND_LAST("The quick brown fox jumps over the lazy dog", "fox", "dog")
// "dog"=FIND_LAST("The quick brown fox jumps over the lazy dog", "dog", "fox")
// "dog"Returns the position of the last needle found in the haystack.
haystack: The string to search in.needles: The strings to search for.
=FIND_LAST_INDEX("The quick brown fox jumps over the lazy dog", "fox", "dog")
// 40=FIND_LAST_INDEX("The quick brown fox jumps over the lazy dog", "dog", "fox")
// 40Joins multiple strings together with a delimiter.
delimiter: The string to insert between each value.values: The values to join.
// Dependencies:
=TRUE() // TRUE
=JOIN("-", 1, 2, "hello", "world", TRUE())
// "1-2-hello-world-TRUE"Returns the length of a string.
value: The string to measure.
=LEN("Hello, World!")
// 13Converts a string to lowercase.
value: The string to convert.
=LOWER("Hello, World!")
// "hello, world!"Pads the end of a string with a specified character.
value: The string to pad.length: The length of the resulting string.character: The character to pad with.
=PAD_END("123", 5, "0")
// "12300"Pads the start of a string with a specified character.
value: The string to pad.length: The length of the resulting string.character: The character to pad with.
=PAD_START("123", 5, "0")
// "00123"Replaces all occurrences of the needles with their replacements.
haystack: The string to search in.zip: The strings to search for and their replacements.
=REPLACE_ALL("The quick brown fox jumps over the lazy dog", "fox", "cat", "dog", "wolf")
// "The quick brown cat jumps over the lazy wolf"Splits a string into an array of substrings separated by a delimiter.
value: The string to split.delimiter: The string to split by.
=SPLIT("Hello World", " ")
// ┌───┬─────────┬─────────┐
// │ │ A │ B │
// ├───┼─────────┼─────────┤
// │ 1 │ "Hello" │ "World" │
// └───┴─────────┴─────────┘Chunk a string into smaller strings of a specified length.
value: The string to chunk.length: The length of each chunk.
=TEXT_CHUNK("ABCDE", 2)
// ┌───┬──────┬──────┬─────┐
// │ │ A │ B │ C │
// ├───┼──────┼──────┼─────┤
// │ 1 │ "AB" │ "CD" │ "E" │
// └───┴──────┴──────┴─────┘Returns a section of a string.
value: The string to slice.start: The index to the beginning of the specified portion of thevalue.end: The index to the end of the specified portion of thevalue. The substring includes the characters up to, but not including, the character indicated byend. If this value is not specified, the substring continues to the end of thevalue.
=TEXT_SLICE("The quick brown fox jumps over the lazy dog", 0, 19)
// "The quick brown fox"=TEXT_SLICE("The quick brown fox jumps over the lazy dog", 40)
// "dog"=TEXT_SLICE("The quick brown fox jumps over the lazy dog", -3)
// "dog"=TEXT_SLICE("The quick brown fox jumps over the lazy dog", 10, 19)
// "brown fox"Returns a sliding window of a specified length over a string.
value: The string to window.length: The length of the window.
=TEXT_WINDOW("ABCDE", 2)
// ┌───┬──────┬──────┬──────┬──────┐
// │ │ A │ B │ C │ D │
// ├───┼──────┼──────┼──────┼──────┤
// │ 1 │ "AB" │ "BC" │ "CD" │ "DE" │
// └───┴──────┴──────┴──────┴──────┘Removes leading and trailing whitespace from a string.
value: The string to trim.
=TRIM(" Hello, World! ")
// "Hello, World!"Converts a string to uppercase.
value: The string to convert.
=UPPER("Hello, World!")
// "HELLO, WORLD!"Tries to convert a value to a boolean.
value: The value to convert.
=AS_BOOLEAN(0)
// FALSE=AS_BOOLEAN(1)
// TRUE=AS_BOOLEAN("123")
// TRUE=AS_BOOLEAN("0")
// TRUE// Dependencies:
=TRUE() // TRUE
=AS_BOOLEAN(TRUE())
// TRUE// Dependencies:
=FALSE() // FALSE
=AS_BOOLEAN(FALSE())
// FALSE// Dependencies:
=NOW() // 2013-01-21 08:15:20
=AS_BOOLEAN(NOW())
// TRUETries to convert a list of values to booleans.
values: The values to convert.
// Dependencies:
=TRUE() // TRUE
=FALSE() // FALSE
=NOW() // 2013-01-21 08:15:20
=AS_BOOLEANS(0, 1, "123", "0", TRUE(), FALSE(), NOW())
// ┌───┬───────┬──────┬──────┬──────┬──────┬───────┬──────┐
// │ │ A │ B │ C │ D │ E │ F │ G │
// ├───┼───────┼──────┼──────┼──────┼──────┼───────┼──────┤
// │ 1 │ FALSE │ TRUE │ TRUE │ TRUE │ TRUE │ FALSE │ TRUE │
// └───┴───────┴──────┴──────┴──────┴──────┴───────┴──────┘Tries to convert a numeric value to a character.
value: The number to convert.
=AS_CHAR(65)
// "A"=AS_CHAR(97)
// "a"Tries to convert a value to a number.
value: The value to convert.
=AS_NUMBER(1)
// 1=AS_NUMBER("123")
// 123=AS_NUMBER("million")
// ERROR: AS_NUMBER() expects a number, got million// Dependencies:
=TRUE() // TRUE
=AS_NUMBER(TRUE())
// 1// Dependencies:
=FALSE() // FALSE
=AS_NUMBER(FALSE())
// 0// Dependencies:
=NOW() // 2013-01-21 08:15:20
=AS_NUMBER(NOW())
// 1358752520000Tries to convert a list of values to numbers.
values: The values to convert.
// Dependencies:
=TRUE() // TRUE
=FALSE() // FALSE
=NOW() // 2013-01-21 08:15:20
=AS_NUMBERS(1, "123", "million", TRUE(), FALSE(), NOW())
// ┌───┬───┬─────┬───────┬───┬───┬───────────────┐
// │ │ A │ B │ C │ D │ E │ F │
// ├───┼───┼─────┼───────┼───┼───┼───────────────┤
// │ 1 │ 1 │ 123 │ Error │ 1 │ 0 │ 1358752520000 │
// └───┴───┴─────┴───────┴───┴───┴───────────────┘
//
// Errors:
//
// · C1: AS_NUMBER() expects a number, got millionTries to convert a value to a string.
value: The value to convert.
=AS_STRING(1)
// "1"=AS_STRING("123")
// "123"// Dependencies:
=TRUE() // TRUE
=AS_STRING(TRUE())
// "TRUE"// Dependencies:
=FALSE() // FALSE
=AS_STRING(FALSE())
// "FALSE"// Dependencies:
=NOW() // 2013-01-21 08:15:20
=AS_STRING(NOW())
// "2013-01-21 08:15:20"// Dependencies:
=TIME() // 08:15:20
=AS_STRING(TIME())
// "08:15:20"Tries to convert a list of values to strings.
values: The values to convert.
// Dependencies:
=TRUE() // TRUE
=FALSE() // FALSE
=NOW() // 2013-01-21 08:15:20
=TIME() // 08:15:20
=AS_STRINGS(1, "123", TRUE(), FALSE(), NOW(), TIME())
// ┌───┬─────┬───────┬────────┬─────────┬───────────────────────┬────────────┐
// │ │ A │ B │ C │ D │ E │ F │
// ├───┼─────┼───────┼────────┼─────────┼───────────────────────┼────────────┤
// │ 1 │ "1" │ "123" │ "TRUE" │ "FALSE" │ "2013-01-21 08:15:20" │ "08:15:20" │
// └───┴─────┴───────┴────────┴─────────┴───────────────────────┴────────────┘Returns the type of a value.
value: The value to check.
=TYPE(1)
// "number"=TYPE("hello")
// "string"// Dependencies:
=TRUE() // TRUE
=TYPE(TRUE())
// "boolean"// Dependencies:
=NOW() // 2013-01-21 08:15:20
=TYPE(NOW())
// "datetime"=TYPE(UNKNOWN_FUNCTION())
// "error"=TYPE(B1)
// "empty"Get the col number of a cell. If no cell is provided, the current cell will be used.
=COL()
// 1=COL(B3)
// 2Inherit a formula from another cell. References to other cells in the formula will be updated to be relative to the current cell.
Try to coerce a value into the type expected by the function argument's type.
Map a list of values using a lambda function.
// Dependencies:
=DIGITS()
// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
// │ 1 │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │
// └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
=MAP(DIGITS(), VALUE() * 2)
// ┌───┬───┬───┬───┬───┬───┬────┬────┬────┬────┬────┐
// │ │ A │ B │ C │ D │ E │ F │ G │ H │ I │ J │
// ├───┼───┼───┼───┼───┼───┼────┼────┼────┼────┼────┤
// │ 1 │ 0 │ 2 │ 4 │ 6 │ 8 │ 10 │ 12 │ 14 │ 16 │ 18 │
// └───┴───┴───┴───┴───┴───┴────┴────┴────┴────┴────┘Get the current col number of the value in the matrix. Only works inside of a MAP().
Get the current row number of the value in the matrix. Only works inside of a MAP().
Get the row number of a cell. If no cell is provided, the current cell will be used.
=ROW()
// 1=ROW(B3)
// 3Get the value of the current position in a matrix. Only works inside of a MAP().