Skip to content

Functions

Expanse recognises 345 functions. The most-used ones run on a native, columnar fast path; the rest evaluate through an Excel-compatible engine. Either way the formula syntax, argument order, and results match what you’d type in Excel.

The Detailed reference below documents the curated set with full argument notes and examples. The Full catalog at the bottom lists every recognised name.

ABS(number)

Returns the absolute value.

ArgumentTypeRequiredExampleDescription
numbervaluerequired-3Value to take the absolute value of.

ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])

Returns the accrued interest for a security that pays periodic interest.

ArgumentTypeRequiredExampleDescription
issuevaluerequiredDATE(2008,3,1)The security’s issue date.
first_interestvaluerequiredDATE(2008,8,31)The security’s first interest date.
settlementvaluerequiredDATE(2008,5,1)The security’s settlement (purchase) date.
ratevaluerequired0.1The security’s annual coupon rate.
parvaluerequired1000The security’s par value (defaults to 1000).
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional0Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.
calc_methodvalueoptionalTRUETRUE accrues from issue, FALSE from first interest (default TRUE).

ACCRINTM(issue, settlement, rate, [par], [basis])

Returns the accrued interest for a security that pays interest at maturity.

ArgumentTypeRequiredExampleDescription
issuevaluerequiredDATE(2008,4,1)The security’s issue date.
settlementvaluerequiredDATE(2008,6,15)The security’s maturity (settlement) date.
ratevaluerequired0.1The security’s annual coupon rate.
parvalueoptional1000Par value of the security (default 1000).
basisvalueoptional3Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

AND(logical1, [logical2], ...)

Returns TRUE only if all arguments are TRUE.

ArgumentTypeRequiredExampleDescription
logical1logicalrequiredA1>0First condition.
logical2logicalrepeatableB1>0Additional conditions.

AVERAGE(number1, [number2], ...)

Returns the arithmetic mean of its arguments.

ArgumentTypeRequiredExampleDescription
number1valuerequiredA1:A10First value or range.
number2valuerepeatableB1:B10Additional values or ranges.

AVERAGEIF(range, criteria, [average_range])

Averages cells matching criteria.

ArgumentTypeRequiredExampleDescription
rangerangerequiredA1:A10Range tested against criteria.
criteriaanyrequired">0"Condition.
average_rangerangeoptionalB1:B10Range to average (defaults to range).

CHOOSE(index_num, value1, [value2], ...)

Picks the value at index_num.

ArgumentTypeRequiredExampleDescription
index_numvaluerequired21-based selector.
value1anyrequired"red"First option.
value2anyrepeatable"green"Additional options.

CHOOSECOLS(array, col_num1, [col_num2], ...)

Returns the chosen columns of an array, in the order given.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to choose from.
col_num1valuerequired11-based column to return; a negative counts from the end.
col_num2valuerepeatable3Additional columns to return.

CHOOSEROWS(array, row_num1, [row_num2], ...)

Returns the chosen rows of an array, in the order given.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to choose from.
row_num1valuerequired11-based row to return; a negative counts from the end.
row_num2valuerepeatable3Additional rows to return.

CONCAT(text1, [text2], ...)

Joins text strings into one.

ArgumentTypeRequiredExampleDescription
text1textrequired"hello"First string or range.
text2textrepeatable" world"Additional strings or ranges.

CONCATENATE(text1, [text2], ...)

Joins text strings into one.

ArgumentTypeRequiredExampleDescription
text1textrequired"hello"First string or range.
text2textrepeatable" world"Additional strings or ranges.

COUNT(value1, [value2], ...)

Counts how many cells contain numbers.

ArgumentTypeRequiredExampleDescription
value1anyrequiredA1:A10First value or range to count.
value2anyrepeatableB1:B10Additional values or ranges.

COUNTA(value1, [value2], ...)

Counts how many cells are not empty.

ArgumentTypeRequiredExampleDescription
value1anyrequiredA1:A10First value or range.
value2anyrepeatableB1:B10Additional values or ranges.

COUNTIF(range, criteria)

Counts cells in range matching criteria.

ArgumentTypeRequiredExampleDescription
rangerangerequiredA1:A10Range to test.
criteriaanyrequired">0"Condition.

COUNTIFS(criteria_range1, criteria1, [criteria_range2], ...)

Counts cells satisfying multiple criteria.

ArgumentTypeRequiredExampleDescription
criteria_range1rangerequiredA1:A10First range tested.
criteria1anyrequired">0"First condition.
criteria_range2rangerepeatableB1:B10Additional range/criteria pairs.

COUPDAYBS(settlement, maturity, frequency, [basis])

Returns the number of days from the start of the coupon period to settlement.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

COUPDAYS(settlement, maturity, frequency, [basis])

Returns the number of days in the coupon period containing the settlement date.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

COUPDAYSNC(settlement, maturity, frequency, [basis])

Returns the number of days from settlement to the next coupon date.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

COUPNCD(settlement, maturity, frequency, [basis])

Returns the next coupon date after the settlement date.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

COUPNUM(settlement, maturity, frequency, [basis])

Returns the number of coupons payable between settlement and maturity.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

COUPPCD(settlement, maturity, frequency, [basis])

Returns the previous coupon date before the settlement date.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2011,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2011,11,15)The security’s maturity date.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

DATE(year, month, day)

Date serial number for the given year/month/day.

ArgumentTypeRequiredExampleDescription
yearvaluerequired2026Four-digit year.
monthvaluerequired3Month (1-12).
dayvaluerequired15Day of month.

DAY(serial_number)

Day component of a date.

ArgumentTypeRequiredExampleDescription
serial_numbervaluerequiredA1Date value.

DISC(settlement, maturity, pr, redemption, [basis])

Returns the discount rate for a security.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2007,1,25)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2007,6,15)The security’s maturity date.
prvaluerequired97.975Price per $100 face value.
redemptionvaluerequired100Redemption value per $100 face value.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

DROP(array, rows, [columns])

Removes rows/columns from the start or end of an array.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to subset.
rowsvaluerequired1Rows to drop; a negative count drops from the end.
columnsvalueoptional1Columns to drop; a negative count drops from the end.

DURATION(settlement, maturity, coupon, yld, frequency, [basis])

Returns the Macaulay duration of a security with an assumed $100 par value.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2018,7,1)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2048,1,1)The security’s maturity date.
couponvaluerequired0.08The security’s annual coupon rate.
yldvaluerequired0.09The security’s annual yield.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

EXPAND(array, rows, [columns], [pad_with])

Pads an array out to the given number of rows and columns.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:B2Range or array to expand.
rowsvaluerequired5Target row count.
columnsvalueoptional3Target column count (default: current width).
pad_withanyoptional0Value for the new cells (default #N/A).

FILTER(array, include, [if_empty])

Returns the rows of a range that meet a condition.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C100Range or array to filter.
includerangerequiredC1:C100Boolean column the same height as array; TRUE keeps the row.
if_emptyanyoptional"none"Returned when nothing matches.

FVSCHEDULE(principal, schedule)

Returns the future value of a principal after applying a series of compound rates.

ArgumentTypeRequiredExampleDescription
principalvaluerequired1The present value to compound.
schedulerangerequiredB1:B3Range of interest rates to apply in sequence.

HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Looks up a value in the first row and returns a value from the same column.

ArgumentTypeRequiredExampleDescription
lookup_valueanyrequired"Q1"Value to find.
table_arrayrangerequiredA1:Z5Range to search.
row_index_numvaluerequired2Row to return (1-based).
range_lookuplogicaloptionalFALSEFALSE for exact match, TRUE for approximate.

HSTACK(array1, [array2], ...)

Stacks ranges side by side into one wider array.

ArgumentTypeRequiredExampleDescription
array1rangerequiredA1:A3First range to stack.
array2rangerepeatableB1:B3Additional ranges, placed to the right.

IF(logical_test, value_if_true, [value_if_false])

Returns one of two values depending on a condition.

ArgumentTypeRequiredExampleDescription
logical_testlogicalrequiredA1>0Condition that returns TRUE/FALSE.
value_if_trueanyrequired"yes"Returned when the test is TRUE.
value_if_falseanyoptional"no"Returned when the test is FALSE.

IFERROR(value, value_if_error)

Returns value_if_error when value is an error.

ArgumentTypeRequiredExampleDescription
valueanyrequiredA1/B1Expression to evaluate.
value_if_erroranyrequired0Fallback when value is an error.

IFNA(value, value_if_na)

Returns value_if_na when value is #N/A.

ArgumentTypeRequiredExampleDescription
valueanyrequiredVLOOKUP(...)Expression to evaluate.
value_if_naanyrequired"not found"Fallback when value is #N/A.

IFS(logical_test1, value1, [logical_test2], ...)

Returns the value for the first true test.

ArgumentTypeRequiredExampleDescription
logical_test1logicalrequiredA1>0First condition.
value1anyrequired"positive"Value when first test is TRUE.
logical_test2logicalrepeatableA1=0Additional test/value pairs.

INDEX(array, row_num, [column_num])

Returns the value at a given row/column position.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to index into.
row_numvaluerequired31-based row position.
column_numvalueoptional21-based column position.

INT(number)

Rounds down to the nearest integer.

ArgumentTypeRequiredExampleDescription
numbervaluerequired3.7Value to truncate downward.

INTRATE(settlement, maturity, investment, redemption, [basis])

Returns the interest rate for a fully invested security.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,5,15)The security’s maturity date.
investmentvaluerequired1000000Amount invested in the security.
redemptionvaluerequired1014420Amount received at maturity.
basisvalueoptional2Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

LEFT(text, [num_chars])

Leftmost num_chars characters of text.

ArgumentTypeRequiredExampleDescription
texttextrequired"hello"Source string.
num_charsvalueoptional3Characters to take (default 1).

LEN(text)

Number of characters in text.

ArgumentTypeRequiredExampleDescription
texttextrequired"hello"String to measure.

LOWER(text)

Converts text to lowercase.

ArgumentTypeRequiredExampleDescription
texttextrequired"HELLO"String to lowercase.

MATCH(lookup_value, lookup_array, [match_type])

Returns the relative position of a match.

ArgumentTypeRequiredExampleDescription
lookup_valueanyrequired"apple"Value to find.
lookup_arrayrangerequiredA1:A100Range to search.
match_typevalueoptional00 exact, 1 ≤, -1 ≥.

MAX(number1, [number2], ...)

Returns the largest value.

ArgumentTypeRequiredExampleDescription
number1valuerequiredA1:A10First value or range.
number2valuerepeatableB1:B10Additional values or ranges.

MDURATION(settlement, maturity, coupon, yld, frequency, [basis])

Returns the modified Macaulay duration of a security with an assumed $100 par value.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2018,7,1)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2048,1,1)The security’s maturity date.
couponvaluerequired0.08The security’s annual coupon rate.
yldvaluerequired0.09The security’s annual yield.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional1Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

MID(text, start_num, num_chars)

Substring of text starting at start_num.

ArgumentTypeRequiredExampleDescription
texttextrequired"hello"Source string.
start_numvaluerequired21-based start position.
num_charsvaluerequired3Characters to take.

MIN(number1, [number2], ...)

Returns the smallest value.

ArgumentTypeRequiredExampleDescription
number1valuerequiredA1:A10First value or range.
number2valuerepeatableB1:B10Additional values or ranges.

MOD(number, divisor)

Returns the remainder.

ArgumentTypeRequiredExampleDescription
numbervaluerequired10Numerator.
divisorvaluerequired3Divisor.

MONTH(serial_number)

Month component of a date.

ArgumentTypeRequiredExampleDescription
serial_numbervaluerequiredA1Date value.

NOT(logical)

Reverses the logical value.

ArgumentTypeRequiredExampleDescription
logicallogicalrequiredA1>0Condition to negate.

NOW()

Current date and time.

OR(logical1, [logical2], ...)

Returns TRUE if any argument is TRUE.

ArgumentTypeRequiredExampleDescription
logical1logicalrequiredA1>0First condition.
logical2logicalrepeatableB1>0Additional conditions.

POWER(number, power)

Raises number to power.

ArgumentTypeRequiredExampleDescription
numbervaluerequired2Base.
powervaluerequired10Exponent.

PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])

Returns the price per $100 face value of a security that pays periodic interest.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2017,11,15)The security’s maturity date.
ratevaluerequired0.0575The security’s annual coupon rate.
yldvaluerequired0.065The security’s annual yield.
redemptionvaluerequired100The redemption value per $100 face value.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional0Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

PRICEDISC(settlement, maturity, discount, redemption, [basis])

Returns the price per $100 face value of a discounted security.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,16)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,3,1)The security’s maturity date.
discountvaluerequired0.0525The security’s discount rate.
redemptionvaluerequired100Redemption value per $100 face value.
basisvalueoptional2Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

PRICEMAT(settlement, maturity, issue, rate, yld, [basis])

Returns the price per $100 face value of a security that pays interest at maturity.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,4,13)The security’s maturity date.
issuevaluerequiredDATE(2007,11,11)The security’s issue date.
ratevaluerequired0.061The security’s interest rate at issue.
yldvaluerequired0.061The security’s annual yield.
basisvalueoptional0Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

PRODUCT(number1, [number2], ...)

Multiplies its arguments.

ArgumentTypeRequiredExampleDescription
number1valuerequiredA1:A10First value or range to multiply.
number2valuerepeatableB1:B10Additional values or ranges.

RANDARRAY([rows], [columns], [min], [max], [whole_number])

Returns an array of random numbers between a minimum and maximum.

ArgumentTypeRequiredExampleDescription
rowsvalueoptional3Number of rows (default 1).
columnsvalueoptional2Number of columns (default 1).
minvalueoptional1Smallest value (default 0).
maxvalueoptional100Largest value (default 1).
whole_numberlogicaloptionalTRUETRUE to return integers instead of decimals.

RECEIVED(settlement, maturity, investment, discount, [basis])

Returns the amount received at maturity for a fully invested security.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,5,15)The security’s maturity date.
investmentvaluerequired1000000Amount invested in the security.
discountvaluerequired0.0575The security’s discount rate.
basisvalueoptional2Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

RIGHT(text, [num_chars])

Rightmost num_chars characters of text.

ArgumentTypeRequiredExampleDescription
texttextrequired"hello"Source string.
num_charsvalueoptional3Characters to take (default 1).

ROUND(number, num_digits)

Rounds to a specified number of digits.

ArgumentTypeRequiredExampleDescription
numbervaluerequired3.14159Value to round.
num_digitsvaluerequired2Number of digits to round to.

SEQUENCE(rows, [columns], [start], [step])

Returns an array of sequential numbers.

ArgumentTypeRequiredExampleDescription
rowsvaluerequired3Number of rows to fill.
columnsvalueoptional2Number of columns (default 1).
startvalueoptional10First value (default 1).
stepvalueoptional5Increment between values (default 1).

SORT(array, [sort_index], [sort_order], [by_col])

Sorts the rows of a range or array.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C100Range or array to sort.
sort_indexvalueoptional11-based column to sort by (default 1).
sort_ordervalueoptional11 ascending (default), -1 descending.
by_collogicaloptionalFALSETRUE to sort columns instead of rows.

SORTBY(array, by_array, [sort_order], [by_array2], ...)

Sorts a range by the values in one or more corresponding ranges.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C100Range or array to sort.
by_arrayrangerequiredD1:D100Values to sort by (same height as array).
sort_ordervalueoptional11 ascending (default), -1 descending.
by_array2rangerepeatableE1:E100Additional by-range / order pairs.

SQRT(number)

Returns the positive square root.

ArgumentTypeRequiredExampleDescription
numbervaluerequired16Value (must be non-negative).

SUM(number1, [number2], ...)

Adds its arguments.

ArgumentTypeRequiredExampleDescription
number1valuerequiredA1:A10First value or range to add.
number2valuerepeatableB1:B10Additional values or ranges.

SUMIF(range, criteria, [sum_range])

Adds cells in sum_range where the matching cell in range meets criteria.

ArgumentTypeRequiredExampleDescription
rangerangerequiredA1:A10Range tested against criteria.
criteriaanyrequired">0"Condition (e.g. ">0", "=apple").
sum_rangerangeoptionalB1:B10Range to add (defaults to range).

SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2], ...)

Adds cells satisfying multiple criteria.

ArgumentTypeRequiredExampleDescription
sum_rangerangerequiredC1:C10Range whose cells to add.
criteria_range1rangerequiredA1:A10First range tested.
criteria1anyrequired">0"First condition.
criteria_range2rangerepeatableB1:B10Additional range/criteria pairs.

SWITCH(expression, value1, result1, [default_or_value2], ...)

Picks the result for the first matching value.

ArgumentTypeRequiredExampleDescription
expressionanyrequiredA1Value to compare against.
value1anyrequired1First candidate value.
result1anyrequired"one"Result when matched.
default_or_value2anyrepeatable2Default, or more value/result pairs.

TAKE(array, rows, [columns])

Returns the first or last rows/columns of an array.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to subset.
rowsvaluerequired2Rows to keep; a negative count takes from the end.
columnsvalueoptional2Columns to keep; a negative count takes from the end.

TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)

Joins text strings with a delimiter.

ArgumentTypeRequiredExampleDescription
delimitertextrequired", "Separator between values.
ignore_emptylogicalrequiredTRUETRUE to skip empty strings.
text1textrequiredA1:A10First string or range.
text2textrepeatableB1:B10Additional strings or ranges.

TOCOL(array, [ignore], [scan_by_column])

Returns the array as a single column.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to flatten.
ignorevalueoptional00 keep all, 1 skip blanks, 2 skip errors, 3 skip both.
scan_by_columnlogicaloptionalFALSETRUE to scan down columns first.

TODAY()

Current date.

TOROW(array, [ignore], [scan_by_column])

Returns the array as a single row.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to flatten.
ignorevalueoptional00 keep all, 1 skip blanks, 2 skip errors, 3 skip both.
scan_by_columnlogicaloptionalFALSETRUE to scan down columns first.

TRANSPOSE(array)

Flips an array so rows become columns and vice versa.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:C10Range or array to transpose.

TRIM(text)

Removes extra spaces.

ArgumentTypeRequiredExampleDescription
texttextrequired" hi "String to trim.

UNIQUE(array, [by_col], [exactly_once])

Returns the distinct rows of a range, in first-seen order.

ArgumentTypeRequiredExampleDescription
arrayrangerequiredA1:A100Range or array to dedupe.
by_collogicaloptionalFALSETRUE to dedupe columns instead of rows.
exactly_oncelogicaloptionalTRUETRUE to return only rows that appear exactly once.

UPPER(text)

Converts text to uppercase.

ArgumentTypeRequiredExampleDescription
texttextrequired"hello"String to uppercase.

VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Looks up a value in the first column and returns a value from the same row.

ArgumentTypeRequiredExampleDescription
lookup_valueanyrequired"apple"Value to find.
table_arrayrangerequiredA1:C100Range to search.
col_index_numvaluerequired2Column to return (1-based).
range_lookuplogicaloptionalFALSEFALSE for exact match, TRUE for approximate.

VSTACK(array1, [array2], ...)

Stacks ranges on top of each other into one taller array.

ArgumentTypeRequiredExampleDescription
array1rangerequiredA1:C1First range to stack.
array2rangerepeatableA2:C2Additional ranges, placed below.

WRAPCOLS(vector, wrap_count, [pad_with])

Wraps a row/column vector into columns of a fixed height.

ArgumentTypeRequiredExampleDescription
vectorrangerequiredA1:A121-D range to wrap.
wrap_countvaluerequired3Values per column.
pad_withanyoptional0Value for the short final column (default #N/A).

WRAPROWS(vector, wrap_count, [pad_with])

Wraps a row/column vector into rows of a fixed width.

ArgumentTypeRequiredExampleDescription
vectorrangerequiredA1:A121-D range to wrap.
wrap_countvaluerequired3Values per row.
pad_withanyoptional0Value for the short final row (default #N/A).

XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Searches lookup_array, returns the matching element of return_array.

ArgumentTypeRequiredExampleDescription
lookup_valueanyrequired"apple"Value to find.
lookup_arrayrangerequiredA1:A100Range to search.
return_arrayrangerequiredB1:B100Range whose value is returned.
if_not_foundanyoptional"missing"Returned when no match.
match_modevalueoptional00 exact, -1 exact-or-next-smaller, 1 exact-or-next-larger, 2 wildcard.
search_modevalueoptional11 first-to-last, -1 last-to-first, 2 binary asc, -2 binary desc.

YEAR(serial_number)

Year component of a date.

ArgumentTypeRequiredExampleDescription
serial_numbervaluerequiredA1Date value.

YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])

Returns the yield on a security that pays periodic interest.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2016,11,15)The security’s maturity date.
ratevaluerequired0.0575The security’s annual coupon rate.
prvaluerequired95.04287The security’s price per $100 face value.
redemptionvaluerequired100The redemption value per $100 face value.
frequencyvaluerequired2Coupons per year: 1 annual, 2 semi-annual, 4 quarterly.
basisvalueoptional0Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

YIELDDISC(settlement, maturity, pr, redemption, [basis])

Returns the annual yield for a discounted security.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,2,16)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,3,1)The security’s maturity date.
prvaluerequired99.795Price per $100 face value.
redemptionvaluerequired100Redemption value per $100 face value.
basisvalueoptional2Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

YIELDMAT(settlement, maturity, issue, rate, pr, [basis])

Returns the annual yield of a security that pays interest at maturity.

ArgumentTypeRequiredExampleDescription
settlementvaluerequiredDATE(2008,3,15)The security’s settlement (purchase) date.
maturityvaluerequiredDATE(2008,11,3)The security’s maturity date.
issuevaluerequiredDATE(2007,11,8)The security’s issue date.
ratevaluerequired0.0625The security’s interest rate at issue.
prvaluerequired100.0123Price per $100 face value.
basisvalueoptional0Day-count: 0 US 30/360, 1 act/act, 2 act/360, 3 act/365, 4 Euro 30/360.

A handful of functions take raw source as their argument instead of a formula. They open the cell up to other engines:

  • =PY(…): Run sandboxed Python. See Python in cells.
  • =SQL(…): Run SQL (Apache DataFusion) over your connected data sources. See SQL in cells.
  • =AI(…): Prompt an LLM and write the answer into the cell.
  • =AI.CLASSIFY(…): Classify a value into one of a set of labels with an LLM.
  • =AI.EXTRACT(…): Pull structured fields out of free text with an LLM.
  • =AI.TRANSLATE(…): Translate text between languages with an LLM.

All 345 recognised functions. Bold names have a detailed entry above.

  • ABS
  • ACOS
  • ACOSH
  • ACOT
  • ACOTH
  • AND
  • ARABIC
  • ASIN
  • ASINH
  • ATAN
  • ATAN2
  • ATANH
  • AVEDEV
  • AVERAGE
  • AVERAGEA
  • AVERAGEIF
  • AVERAGEIFS
  • BASE
  • BESSELI
  • BESSELJ
  • BESSELK
  • BESSELY
  • BETA.DIST
  • BETA.INV
  • BIN2DEC
  • BIN2HEX
  • BIN2OCT
  • BINOM.DIST
  • BINOM.DIST.RANGE
  • BINOM.INV
  • BITAND
  • BITLSHIFT
  • BITOR
  • BITRSHIFT
  • BITXOR
  • CEILING
  • CEILING.MATH
  • CEILING.PRECISE
  • CELL
  • CHISQ.DIST
  • CHISQ.DIST.RT
  • CHISQ.INV
  • CHISQ.INV.RT
  • CHISQ.TEST
  • CHOOSE
  • COLUMN
  • COLUMNS
  • COMBIN
  • COMBINA
  • COMPLEX
  • CONCAT
  • CONCATENATE
  • CONFIDENCE.NORM
  • CONFIDENCE.T
  • CONVERT
  • CORREL
  • COS
  • COSH
  • COT
  • COTH
  • COUNT
  • COUNTA
  • COUNTBLANK
  • COUNTIF
  • COUNTIFS
  • COVARIANCE.P
  • COVARIANCE.S
  • CSC
  • CSCH
  • CUMIPMT
  • CUMPRINC
  • DATE
  • DATEDIF
  • DATEVALUE
  • DAVERAGE
  • DAY
  • DAYS
  • DAYS360
  • DB
  • DCOUNT
  • DCOUNTA
  • DDB
  • DEC2BIN
  • DEC2HEX
  • DEC2OCT
  • DECIMAL
  • DEGREES
  • DELTA
  • DEVSQ
  • DGET
  • DMAX
  • DMIN
  • DOLLARDE
  • DOLLARFR
  • DPRODUCT
  • DSTDEV
  • DSTDEVP
  • DSUM
  • DVAR
  • DVARP
  • EDATE
  • EFFECT
  • EOMONTH
  • ERF
  • ERF.PRECISE
  • ERFC
  • ERFC.PRECISE
  • ERROR.TYPE
  • EVEN
  • EXACT
  • EXP
  • EXPON.DIST
  • F.DIST
  • F.DIST.RT
  • F.INV
  • F.INV.RT
  • F.TEST
  • FACT
  • FACTDOUBLE
  • FALSE
  • FIND
  • FISHER
  • FISHERINV
  • FLOOR
  • FLOOR.MATH
  • FLOOR.PRECISE
  • FORMULATEXT
  • FV
  • GAMMA
  • GAMMA.DIST
  • GAMMA.INV
  • GAMMALN
  • GAMMALN.PRECISE
  • GAUSS
  • GCD
  • GEOMEAN
  • GESTEP
  • HARMEAN
  • HEX2BIN
  • HEX2DEC
  • HEX2OCT
  • HLOOKUP
  • HOUR
  • HYPGEOM.DIST
  • IF
  • IFERROR
  • IFNA
  • IFS
  • IMABS
  • IMAGINARY
  • IMARGUMENT
  • IMCONJUGATE
  • IMCOS
  • IMCOSH
  • IMCOT
  • IMCSC
  • IMCSCH
  • IMDIV
  • IMEXP
  • IMLN
  • IMLOG10
  • IMLOG2
  • IMPOWER
  • IMPRODUCT
  • IMREAL
  • IMSEC
  • IMSECH
  • IMSIN
  • IMSINH
  • IMSQRT
  • IMSUB
  • IMSUM
  • IMTAN
  • INDEX
  • INDIRECT
  • INFO
  • INT
  • INTERCEPT
  • IPMT
  • IRR
  • ISBLANK
  • ISERR
  • ISERROR
  • ISEVEN
  • ISFORMULA
  • ISLOGICAL
  • ISNA
  • ISNONTEXT
  • ISNUMBER
  • ISO.CEILING
  • ISODD
  • ISOWEEKNUM
  • ISPMT
  • ISREF
  • ISTEXT
  • KURT
  • LARGE
  • LCM
  • LEFT
  • LEN
  • LN
  • LOG
  • LOG10
  • LOGNORM.DIST
  • LOGNORM.INV
  • LOOKUP
  • LOWER
  • MATCH
  • MAX
  • MAXA
  • MAXIFS
  • MEDIAN
  • MID
  • MIN
  • MINA
  • MINIFS
  • MINUTE
  • MIRR
  • MOD
  • MONTH
  • MROUND
  • N
  • NA
  • NEGBINOM.DIST
  • NETWORKDAYS
  • NETWORKDAYS.INTL
  • NOMINAL
  • NORM.DIST
  • NORM.INV
  • NORM.S.DIST
  • NORM.S.INV
  • NOT
  • NOW
  • NPER
  • NPV
  • OCT2BIN
  • OCT2DEC
  • OCT2HEX
  • ODD
  • OFFSET
  • OR
  • PDURATION
  • PEARSON
  • PHI
  • PI
  • PMT
  • POISSON.DIST
  • POWER
  • PPMT
  • PRODUCT
  • PV
  • QUOTIENT
  • RADIANS
  • RAND
  • RANDBETWEEN
  • RANK.AVG
  • RANK.EQ
  • RATE
  • REPT
  • RIGHT
  • ROMAN
  • ROUND
  • ROUNDDOWN
  • ROUNDUP
  • ROW
  • ROWS
  • RRI
  • RSQ
  • SEARCH
  • SEC
  • SECH
  • SECOND
  • SHEET
  • SHEETS
  • SIGN
  • SIN
  • SINH
  • SKEW
  • SKEW.P
  • SLN
  • SLOPE
  • SMALL
  • SQRT
  • SQRTPI
  • STANDARDIZE
  • STDEV.P
  • STDEV.S
  • STDEVA
  • STDEVPA
  • STEYX
  • SUBSTITUTE
  • SUBTOTAL
  • SUM
  • SUMIF
  • SUMIFS
  • SUMSQ
  • SUMX2MY2
  • SUMX2PY2
  • SUMXMY2
  • SWITCH
  • SYD
  • T
  • T.DIST
  • T.DIST.2T
  • T.DIST.RT
  • T.INV
  • T.INV.2T
  • T.TEST
  • TAN
  • TANH
  • TBILLEQ
  • TBILLPRICE
  • TBILLYIELD
  • TEXT
  • TEXTAFTER
  • TEXTBEFORE
  • TEXTJOIN
  • TIME
  • TIMEVALUE
  • TODAY
  • TRIM
  • TRUE
  • TRUNC
  • TYPE
  • UNICODE
  • UPPER
  • VALUE
  • VALUETOTEXT
  • VAR.P
  • VAR.S
  • VARA
  • VARPA
  • VLOOKUP
  • WEEKDAY
  • WEEKNUM
  • WEIBULL.DIST
  • WORKDAY
  • WORKDAY.INTL
  • XIRR
  • XLOOKUP
  • XNPV
  • XOR
  • YEAR
  • YEARFRAC
  • Z.TEST