Numeric functions
This cheat sheet provides a quick reference guide for various mathematical functions commonly used in data analysis and programming. Each function is accompanied by its syntax, a sample usage, and a brief description.
ABS
The ABS function returns the distance of the number from zero on the number line, ensuring that the result is non-negative.
Syntax
ABS(number)
Sample
ABS(10.35) => 10.35
ABS(-15) => 15
ADD
The ADD function computes the total of multiple numbers provided as arguments.
Syntax
ADD(number1, [number2, ...])
Sample
ADD(5, 7) => 12
ADD(-10, 15, 20) => 25
AVG
The AVG function calculates the mean of a set of numerical values.
Syntax
AVG(number1, [number2, ...])
Sample
AVG(10, 20, 30) => 20
AVG(-5, 5) => 0
CEILING
The CEILING function rounds a number up to the nearest integer greater than or equal to the input.
Syntax
CEILING(number)
Sample
CEILING(8.75) => 9
CEILING(-15.25) => -15
COUNT
The COUNT function calculates the number of numeric arguments provided.
Syntax
COUNT(number1, [number2, ...])
Sample
COUNT(1, 2, "abc", 3) => 3
COUNT(-5, 0, "$abc", 5) => 3
COUNTA
The COUNTA function counts the number of non-empty arguments provided.
Syntax
COUNTA(value1, [value2, ...])
Sample
COUNTA(1, "", "text") => 2
COUNTA("one", "two", "three") => 3
COUNTALL
The COUNTALL function calculates the total number of arguments, both numeric and non-numeric.
Syntax
COUNTALL(value1, [value2, ...])