Formula Functions

werkbook supports 55+ Excel-compatible formula functions. All functions are available in the community edition.

Math

FunctionSyntaxDescription
ABSABS(number)Returns the absolute value
CEILINGCEILING(number, significance)Rounds up to the nearest multiple of significance
FLOORFLOOR(number, significance)Rounds down to the nearest multiple of significance
INTINT(number)Rounds down to the nearest integer
MODMOD(number, divisor)Returns the remainder after division
POWERPOWER(number, power)Returns the result of a number raised to a power
RANDRAND()Returns a random number between 0 and 1
RANDBETWEENRANDBETWEEN(bottom, top)Returns a random integer between two values
ROUNDROUND(number, num_digits)Rounds to a specified number of digits
ROUNDDOWNROUNDDOWN(number, num_digits)Rounds toward zero
ROUNDUPROUNDUP(number, num_digits)Rounds away from zero
SQRTSQRT(number)Returns the square root

Statistics

FunctionSyntaxDescription
AVERAGEAVERAGE(number1, ...)Returns the arithmetic mean
AVERAGEIFAVERAGEIF(range, criteria, [avg_range])Averages cells that meet a condition
COUNTCOUNT(value1, ...)Counts cells containing numbers
COUNTACOUNTA(value1, ...)Counts non-empty cells
COUNTBLANKCOUNTBLANK(range)Counts empty cells in a range
COUNTIFCOUNTIF(range, criteria)Counts cells that meet a condition
COUNTIFSCOUNTIFS(range1, criteria1, ...)Counts cells meeting multiple conditions
LARGELARGE(array, k)Returns the k-th largest value
MAXMAX(number1, ...)Returns the largest value
MINMIN(number1, ...)Returns the smallest value
SMALLSMALL(array, k)Returns the k-th smallest value
SUMSUM(number1, ...)Adds all numbers
SUMIFSUMIF(range, criteria, [sum_range])Sums cells that meet a condition
SUMIFSSUMIFS(sum_range, range1, criteria1, ...)Sums cells meeting multiple conditions
SUMPRODUCTSUMPRODUCT(array1, ...)Returns the sum of element-wise products

Text

FunctionSyntaxDescription
CHOOSECHOOSE(index, value1, ...)Returns a value from a list by index
CONCATENATECONCATENATE(text1, ...)Joins text strings
CONCATCONCAT(text1, ...)Joins text strings (modern version)
FINDFIND(find_text, within_text, [start])Finds text within another string (case-sensitive)
LEFTLEFT(text, [num_chars])Returns leftmost characters
LENLEN(text)Returns the length of a string
LOWERLOWER(text)Converts to lowercase
MIDMID(text, start, num_chars)Returns characters from the middle of a string
RIGHTRIGHT(text, [num_chars])Returns rightmost characters
SUBSTITUTESUBSTITUTE(text, old, new, [instance])Replaces occurrences of text
TEXTTEXT(value, format_text)Formats a number as text
TRIMTRIM(text)Removes extra spaces
UPPERUPPER(text)Converts to uppercase

Date

FunctionSyntaxDescription
DATEDATE(year, month, day)Creates a date serial number
DAYDAY(serial_number)Returns the day of the month (1–31)
MONTHMONTH(serial_number)Returns the month (1–12)
NOWNOW()Returns the current date and time
TODAYTODAY()Returns the current date
YEARYEAR(serial_number)Returns the year

Logic

FunctionSyntaxDescription
ANDAND(logical1, ...)Returns TRUE if all arguments are true
IFIF(condition, value_if_true, value_if_false)Conditional evaluation
IFERRORIFERROR(value, value_if_error)Returns a value if no error, otherwise the fallback
NOTNOT(logical)Reverses a boolean value
OROR(logical1, ...)Returns TRUE if any argument is true

Lookup

FunctionSyntaxDescription
HLOOKUPHLOOKUP(value, table, row_index, [range_lookup])Horizontal lookup in a table
INDEXINDEX(array, row_num, [col_num])Returns a value at a given position
MATCHMATCH(value, lookup_array, [match_type])Returns the position of a value in a range
VLOOKUPVLOOKUP(value, table, col_index, [range_lookup])Vertical lookup in a table

Info

FunctionSyntaxDescription
IFNAIFNA(value, value_if_na)Returns a value if no #N/A error, otherwise the fallback

Using the CLI

List all registered functions from the command line:

wb formula list