Calculated columns
Calculated Column formulas can be used to perform a wide range of operations on data, from simple arithmetic to complex logical and statistical computations. Whether you're rounding numbers, extracting portions of dates, calculating averages, or transforming texts, these formulas provide the versatility to generate the data you need.
Here are some typical use cases for Calculated Column functions:
Data Cleaning and Transformation: Effortlessly clean and reformat data, such as trimming whitespace, changing text casing, or converting date formats.
Statistical Analysis: Perform statistical calculations like averages, variances, or standard deviations to derive insights from numerical data sets.
Logical Operations: Apply logical tests to data to create flags, indicators, or to filter and categorize data based on specific criteria.
Mathematical Operations: Execute a variety of mathematical operations, enabling complex calculations like financial modelling or engineering calculations.
Text and Date Manipulation: Extract or transform portions of text and date fields, which is particularly useful in data preparation for reporting or further analysis.
Syntax
Calculated Columns are composed of a library of functions and operators used to build formulas and expressions in Syntho. When creating calculated columns in Syntho, you must follow specific syntax rules and best practices. Here are the fundamental syntax rules for Calculated Column expressions when creating calculated columns:
Formula Structure: An example Calculated Column formula is:
SUM(Table[ExistingColumn])
.References:
Column References: When referring to a column within the same table, you can just use the column name in square brackets:
[ColumnName]
.Table References: If you need to reference a column in a different table, use the table name followed by the column name in square brackets:
TableName[ColumnName]
.If your table names use spaces or special characters, enclose the name in single quotes.
Schema References: References to tables outside of the existing schema are not supported.
Functions: Calculated Column includes a wide range of functions that can be used in your expressions, such as aggregation functions (
SUM
,AVERAGE
), time intelligence functions (DATE
,DATEADD
), logical functions (IF
,AND
,OR
), and many more. Functions follow the syntax ofFUNCTION_NAME(arguments)
.Mockers: Mockers can be added using the autosuggestion dropdown, using the syntax
MOCK_MOCKER_NAME
, where MOCKER_NAME should be replaced with the relevant mocker name (e.g. FIRST_NAME). Any applied mockers in calculated columns will use the default mocker parameter settings. For each mocker, there is a mocker variant with and without consistent mapping. To enable consistent mapping, use the variant:MOCK_CONSISTENT_ MOCKER_NAME
.Operators: Calculated Column supports various operators for arithmetic calculations (
+
,-
,*
,/
), and comparison (<
,>
,<=
,>=
,=
,<>
) operations.Constants: You can use constants like numbers (
123
), strings ("text"
), and dates (DATE(2020, 12, 31)
).Handling Errors: Use error handling functions like
IFERROR
to manage errors in your expressions.Whitespace and Line Breaks: Whitespace and line breaks do not affect the interpretation of the formula but can make your formulas easier to read.
Here's an example of a calculated column formula that calculates the total sales plus tax for each row in a table:
In this formula, [Total Sales]
and [Tax Rate]
are existing columns in the same table, and the formula calculates the total sales including tax for each row in the table.
Another example is the first name mocker. Imagine having a table with a column for first names. However, the user wants to generate male mock data for male names and female mock data for female names based on checking their gender in the gender column. This request can be expressed using the formula below:
If you would like to add a mocker to a calculated column formula, type "MOCK_
" and you will see the names of mockers in the dropdown list. Either choose from the list or add the name of the mocker to the end of "MOCK_
", with whitespaces replaced by underscores. Therefore, mockers like "First name female" and "Company Email" should be entered as "MOCK_FIRST_NAME_FEMALE
" and "MOCK_COMPANY_EMAIL
," respectively. A complete list of mockers can be found in the Mockers section.
Using Consistently Mapped Mockers
All mockers have variants to support consistent mapping. This ensures that input from the same column is consistently mocked.
Example:
The existing
MOCK_FIRST_NAME
predefined mocker has a variantMOCK_CONSISTENT_FIRST_NAME
. This new mocker consistently maps and mocks input from the same column where it is attached.
Supported calculated column functions
ABS
Returns the absolute value of a number.
Syntax
Parameters
Return value
An absolute value of the number.
Example
The following formulas calculate absolute values of the column "HEALTHCARE_COVERAGE", -5 and mock value.
ACOS
Returns the arccosine (inverse cosine) of a given number. The arccosine represents the angle whose cosine corresponds to the provided number. The result is an angle measured in radians, within the range of 0 to π.
Syntax
Parameters
Return value
The inverse trigonometric cosine of the number provided.
Example
The following formulas calculate arccosine (inverse cosine) of a given column, number or a random value. Note that, to generate a random real number between -1 and 1, use to following formula with RAND function.
ACOSH
Computes the inverse hyperbolic cosine of a specified number. The input number must be 1 or greater. The inverse hyperbolic cosine is the value for which the hyperbolic cosine equals the given number, meaning that ACOSH(COSH(number))
will return the original number.
Syntax
Parameters
Return value
An inverse hyperbolic cosine of a specified number.
Example
The following formula calculates inverse hyperbolic cosine of the values of the column called "HEALTHCARE_EXPENSES".
ACOT
Returns the principal value of the arccotangent (inverse cotangent) of a given number. The result is an angle measured in radians, ranging from 0 to π. To convert the result from radians to degrees, you can use the DEGREES
function or multiply by 180/PI()
.
Syntax
Parameters
Return value
The principal value of the arccotangent (inverse cotangent) of a given number.
Example
The following formulas calculate the principal value of the arccotangent (inverse cotangent) of the values of the column called "HEALTHCARE_EXPENSES", number 7 and mock value.
ACOTH
Returns the inverse hyperbolic cotangent of a number.
Syntax
Parameters
Return value
The inverse hyperbolic cotangent of a specified number.
Example
The following formulas calculate the inverse hyperbolic cotangent of given column, mock value and number 20 which is approximately 0.05.
AND
The AND
function returns TRUE
if all provided arguments evaluate to TRUE
, and FALSE
if any argument evaluates to FALSE
.
A common use case for the AND
function is enhancing other functions that perform logical tests. For instance, the IF
function tests a condition and returns one value if the condition is TRUE
and another value if it is FALSE
. By using AND
as the logical_test
argument in the IF
function, you can test multiple conditions simultaneously rather than just one.
Syntax
Parameters
Return value
Returns TRUE if all arguments are TRUE.
Example
The following formula will return TRUE
if gender of the person is male and his healthcare coverage value is more than 100. If any of the conditions fails, then it will return FALSE
.
ARABIC
Converts a Roman numeral into an Arabic numeral.
Syntax
Parameters
Return value
An Arabic numeral.
Example
The following formulas convert the given column or a roman numeral "MCMXCVII" into an Arabic numeral which is 1997.
ASIN
Calculates the arcsine (inverse sine) of a specified number. The arcsine represents the angle whose sine is the given number. The result is an angle measured in radians, ranging from -π/2 to π/2. To convert the result from radians to degrees, multiply the output by 180/PI()
or use the DEGREES
function.
Syntax
Parameters
Return value
The inverse trigonometric sine of a number.
Example
The following formulas calculate the inverse trigonometric sine of 0.7, given column or mock value.
ASINH
Calculates the inverse hyperbolic sine of a specified number. The inverse hyperbolic sine is the value for which the hyperbolic sine equals the given number, meaning ASINH(SINH(number))
will return the original number.
Syntax
Parameters
Return value
The inverse hyperbolic sine of a number.
Example
The following formulas calculate the inverse hyperbolic sine of the values of the column called "HEALTHCARE_EXPENSES", number or mock values.
ATAN
Calculates the arctangent (inverse tangent) of a specified number. The arctangent represents the angle whose tangent equals the given number. The result is an angle measured in radians, ranging from -π/2 to π/2. To convert the result from radians to degrees, multiply the output by 180/PI()
or use the DEGREES
function.
Syntax
Parameters
Return value
Returns the inverse trigonometric tangent of a number.
Example
The following formulas calculate the inverse trigonometric tangent of the values of the column called "HEALTHCARE_EXPENSES", number or mock value.
ATAN2
Calculates the arctangent (inverse tangent) of the specified x- and y-coordinates. The arctangent represents the angle between the x-axis and a line that passes through the origin (0, 0) and a point with coordinates (x_num, y_num)
. The angle is measured in radians, ranging from -π to π, excluding -π.
Syntax
Parameters
Return value
The inverse trigonometric tangent of the specified x and y coordinates.
Example
The following formulas calculate the inverse trigonometric tangent of x (latitudes) and y (longitudes) coordinates.
ATANH
Calculates the inverse hyperbolic tangent of a specified number. The input number must be between -1 and 1 (excluding -1 and 1). The inverse hyperbolic tangent is the value for which the hyperbolic tangent equals the given number, meaning ATANH(TANH(number))
will return the original number.
Syntax
Parameters
Return value
The inverse hyperbolic tangent of a number.
Example
The following formulas calculate the inverse hyperbolic tangent of -0.5, given column called "ANGLES" or random number. Note that, to generate a random real number between -1 and 1, use to following formula with RAND function.
AVEDEV
Calculates the average of the absolute deviations of data points from their mean. AVEDEV
provides a measure of the variability within a data set.
Syntax
Parameters
Return value
The average deviation of the arguments.
Example
The following formulas calculate the average deviation of the values of the columns "HEALTHCARE_EXPENSES" and "HEALTHCARE_COVERAGE" for every row or numbers.
AVERAGE
Calculates the average (arithmetic mean) of the provided arguments/numbers.
Syntax
Parameters
Return value
The average of the arguments.
Example
The following formula calculates the average of the values of "HEALTHCARE_EXPENSES" and "HEALTHCARE_COVERAGE" for every row, numbers or mock values.
AVERAGEA
Calculates the average (arithmetic mean) of the values in the list of arguments. Arguments can be numbers; names, or references that contain numbers; text representations of numbers; or logical values like TRUE
and FALSE
. If you want to exclude logical values and text representations of numbers in a reference from the calculation, use the AVERAGE
function instead.
Syntax
Parameters
Return value
The average of the arguments.
Example
The following formula calculates the average of the below columns for every row.
AVERAGEIF
Returns a column of dates, shifted forward or backward by the specified number of intervals.
Syntax
Parameters
Return value
The arithmetic mean of all arguments in a range that satisfy a given condition.
Example
The following formula calculates the arithmetic mean of all incomes in a range that satisfy a given conditions which are either general or family practices.
BASE
Converts a number into its text representation in the specified radix (base).
Syntax
Parameters
Return value
Converts a positive integer to a specified base into a text from the numbering system.
Example
The following formulas calculate the text representation of the number in the specified radix (base).
BASE(5, 2) converts the decimal number 5 to base 2 (binary). Result is 101.
BASE(5, 2, 8) converts 5 into 101 and add 5 leading zeros to make the string 8 characters long, so answer should be 00000101.
BASE(42,16) converts 42 to base 16 (hexadecimal). The result is 2A.
Alternatively, use columns or mock values.
CEILING
Rounds a number up, away from zero, to the nearest multiple of a specified significance. The function always rounds a value up, away from zero, regardless of the sign of the number. If the number is an exact multiple of the significance, no rounding is performed. If both the number and significance are negative, the value is rounded down, away from zero. If the number is negative and the significance is positive, the value is rounded up toward zero.
Syntax
Parameters
Return value
A number rounded up to the nearest multiple of Significance.
Example
The following formulas calculates different values rounded up to the nearest multiple of Significance.
CEILING.MATH
Rounds a number up to the nearest integer or to the nearest specified multiple of significance. By default, the significance is +1 for positive numbers and -1 for negative numbers. Positive numbers with decimal portions are typically rounded up to the nearest integer. Negative numbers with decimal portions are rounded up toward zero by default. You can modify the rounding direction for negative numbers by using the significance and mode arguments. For example, rounding -2.5 with a significance of 1 and a mode of 1 will round away from zero to -3. Various combinations of significance and mode can alter the rounding behavior of negative numbers. Note that the mode argument does not influence positive numbers and the significance argument rounds the number up to the nearest integer that is a multiple of the specified significance unless the number is already an integer. For example, with a significance of 5, the number is rounded up to the next integer multiple of 5. Lastly, if dividing the number by a significance of 2 or more results in a remainder, the number is rounded up.
Syntax
Parameters
Return value
A number rounded up to the nearest integer or to the nearest specified multiple of significance.
Example
The following formulas round -6.5 down (away from 0) to the nearest integer that is a multiple of 3 with a mode of -1, which reverses rounding direction (-9). Use columns or mock values to round numbers as well.
CEILING.PRECISE
Rounds a number up to the nearest integer or the nearest specified multiple of significance. The number is always rounded up, regardless of its sign. If either the number or the significance is zero, the function returns zero. The function uses the absolute value of the significance, so it rounds the number up regardless of the signs of the number and significance.
Syntax
Parameters
Return value
A number rounded up to the nearest multiple of Significance.
Example
The following formulas calculates different values rounded up to the nearest multiple of Significance.
CHAR
Returns the character corresponding to a specified number.
Syntax
Parameters
Return value
A number converted into a character according to the current code table.
Example
The following formula converts any number like 77 or 37 into a character according to the current code table which are letter "M" and symbol of percentage "%", respectively.
CHOOSE
Returns a value from a list of arguments based on a specified index number. The CHOOSE
function allows you to select one of up to 30 values using the index number. For instance, if value1
through value7
represent the days of the week, CHOOSE
can return a specific day when provided with an index number between 1 and 7.
Syntax
Parameters
Return value
A value from a list of up to 30 values.
Example
The following formula returns the value of the third list argument which is ZIP. You can use numbers or mock values as well.
CLEAN
Removes all nonprintable characters from a given text. The CLEAN
function is useful for cleaning text imported from other applications that may contain characters not supported by your operating system. For example, it can remove low-level computer code that often appears at the beginning or end of data files and cannot be printed.
Important
The CLEAN
function is designed to remove the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31). However, in the Unicode character set, there are additional nonprinting characters (values 127, 129, 141, 143, 144, and 157) that the CLEAN
function does not remove.
Syntax
Parameters
Return value
The text that has been "cleaned" of line breaks and other non-printable characters.
Example
The following formula returns the text that has been "cleaned" which is "Patient Medications". You can use columns or mock values as well.
CODE
Returns the numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.
Syntax
Parameters
Return value
A numeric code for the first character in a text string.
Example
The following formula calculates the text from which you want to obtain the code of the first character which is either 70 or 77, since they correspond to either "F" or "M". Alternatively, use text or mock values.
COMPLEX
Converts real and imaginary coefficients into a complex number in the form of x + yi
or x + yj
.
Syntax
Parameters
Important
All complex number functions accept "i" and "j" as suffixes, but not "I" or "J".
When working with multiple complex numbers in functions, all suffixes must match.
Return value
The complex number from Re and Im parts.
Example
The following formula calculates the complex number from Re and Im parts which is LAT + LON * j
, for example, (2+5j)
. Alternatively, use numbers or mock values.
CONCATENATE
The CONCATENATE
function joins two or more text strings into a single string.
Syntax
Parameters
Return value
Several text strings combined into one string.
Example
The following formula combines several text strings into one string. For example, concatenating state and county can result in texts such as "Massachusetts, Bristol County". Alternatively, use texts or mock values.
COS
Calculates the cosine of a specified angle. If the angle is in degrees, convert it to radians by multiplying it by PI()/180
or by using the RADIANS
function.
Syntax
Parameters
Return value
The cosine of the given angle (in radians).
Example
The following formulas calculate the cosine of the given angle (in radians), numbers or mock values.
COSH
Calculates the hyperbolic cosine of a given number.
Syntax
Parameters
Return value
The hyperbolic cosine of the given value.
Example
The following formulas calculate the hyperbolic cosine of latitudes of every row, number or mock values.
COT
Calculates the cotangent of a given angle in radians.
Syntax
Parameters
Return value
The cotangent of the given angle (in radians).
Example
The following formula calculates the cotangent of the given angle (in radians), mock value or a column such as healthcare coverage.
COUNT
The COUNT
function tallies the number of arguments containing numeric values and counts numbers within the list of provided arguments. Use COUNT
to determine the number of numeric entries in a range or array. The arguments can include various types of data, but only numeric values are counted.
Note that:
Arguments that are numbers, dates, or text representations of numbers (e.g., a number in quotation marks like
"1"
) are counted.Logical values and text representations of numbers directly typed into the arguments are also counted.
Arguments that are error values or text that cannot be converted to numbers are not counted.
If an argument is an array or reference, only the numeric values within that array or reference are counted; logical values, text, or error values are ignored.
To count logical values, text, or error values, use the
COUNTA
function.To count only numbers that meet specific criteria, use the
COUNTIF
orCOUNTIFS
functions.
Syntax
Parameters
Return value
Count of how many numbers are in the list of arguments.
Example
The following formulas calculate counts of how many values are in the list of columns for every row, numbers or mock values.
COUNTA
The COUNTA
function counts the number of non-empty arguments in a specified range. The COUNTA
function counts arguments that contain any type of data, including error values and empty text (""
). If you only need to count cells that contain numbers, use the COUNT
function instead. To count arguments that meet specific criteria, use the COUNTIF
function.
Syntax
Parameters
Return value
Count of how many values are in the list of arguments.
Example
The following formula calculates counts of how many values are in the list of columns that is non-blank for every row, numbers or mock values.
COUNTBLANK
The COUNTBLANK
function, counts the number of empty values within a specified range.
Syntax
Parameters
Return value
A column of date values.
Example
The following formulas calculate counts of how many values are in the list of columns that is blank for every row, number or mock values.
COUNTIF
The COUNTIF
function counts the number of values that meet a specific criterion. Use COUNTIF
to count how many times a particular thing appears in a range.
Syntax
Parameters
Return value
The number of values that meet with certain criteria within a value range.
Example
The following formulas calculate the number of names that is "David" within first name and last name columns for every row.
DATE
The DATE
function creates a date value by combining individual year, month, and day components. This function is useful for combining separate year, month, and day values into a single date.
Syntax
Parameters
Return value
The specified date as the number of full days since nullDate.
Example
The following formula calculates the specified date as the number of full days since nullDate which is 2012-08-24 00:00:00.
DATEADD
Returns a column of dates, shifted forward or backward by the specified number of intervals.
Syntax
Parameters
Return value
A column of date values.
Example
The following formula calculates dates that are 20 years after the dates in the Birthdate column.
DATEVALUE
Description
The DATEVALUE
function converts a date stored as text into a date. Note that the results of the DATEVALUE
function may vary depending on your computer's system date settings. The DATEVALUE
function is useful when you have dates in a text format that you want to filter, sort, format as dates, or use in date calculations.
Syntax
Parameters
Return value
A date that is converted from text to a date in datetime format.
Example
The following formula calculates a date that is converted from text or a column to a date in datetime format.
Alternatively, following formulas can be used as well:
DATEVALUE("6/24/2012")
DATEVALUE("2012/6/24")
DATEVALUE("24-JUNE-2024")
DATEVALUE("24-JUNE")
DAY
The DAY
function returns the day of a date represented by a serial number, with the day provided as an integer ranging from 1 to 31.
Syntax
Parameters
Return value
The day of the given date value.
Example
The following formula calculates the day of the given date value which is 24.
DAYS
The DAYS
function calculates the number of days between two dates.
Syntax
Parameters
Return value
The difference between two date values.
Example
The following formula calculates the difference between two date values which is 10.
DATEDIFF
The DateDiff
function returns the number of time intervals between two specified dates.
Syntax
Parameters
Return value
The number of units between two dates as defined in the interval.
Example
The following formula calculates the number of units between two dates as defined in the interval which is
DEC2HEX
The DEC2HEX
function converts a decimal number to its hexadecimal equivalent.
Syntax
Parameters
Return value
The hexadecimal number for the decimal number entered.
Example
The following formula converts decimal value 250 to hexadecimal with 5 characters ("padded" with three leading zeros) which is 000FA.
DECIMAL
The DECIMAL
function converts a text representation of a number in a specified base (radix) into a decimal number.
Syntax
Parameters
Return value
A text with characters converted from a number system to a positive integer in the base radix given.
Example
The following formula converts text "FA" from 16 base number system to a positive integer in the base radix given which is 250.
DEGREES
Returns a column of dates, shifted forward or backward by the specified number of intervals.
Syntax
Parameters
Return value
Degrees converted from radians.
Example
The following formula converts PI radians into degrees which returns 180.
DELTA
The DELTA
function checks whether two values are equal. It returns 1
if number1
equals number2
, and 0
otherwise.
Syntax
Parameters
Return value
Returns TRUE (1) if both numbers are equal, otherwise returns FALSE (0).
Example
The following formula checks if a patient's healthcare coverage and expenses are equal. If equal, it will return 1, otherwise 0.
EVEN
The EVEN
function rounds a number up to the nearest even integer. The function always rounds a value up and away from zero, regardless of its sign. If the number column
is already an even integer, no rounding occurs.
Syntax
Parameters
Return value
A positive number rounded up to the next even integer and a negative number rounded down to the next even integer.
Example
The following formula rounds healthcare coverage to the nearest even integer.
EXP
The EXP
function returns the value of e
raised to the power of a specified number, where e
is the mathematical constant approximately equal to 2.71828182845904, the base of the natural logarithm. To calculate powers of other bases, use the exponentiation operator (^
). The EXP
function is the inverse of the LN
function, which calculates the natural logarithm of a number.
Syntax
Parameters
Return value
Returns constant e raised to the power of a number.
Example
The following formula calculates constant e raised to the power of either 12 which is 162754.79141900383 or the values of "DISPENSES".
FACT
Returns a factorial of a number.
Syntax
Parameters
Return value
A factorial of a number.
Example
The following formula calculates a factorial of either 5 which is 120 or the values of "DISPENSES".
FACTDOUBLE
The FACTDOUBLE
function returns the double factorial of a specified number.
Syntax
Parameters
Return value
A double factorial of a number.
Example
The following formula calculates a double factorial of 6 which is 48. If it would be 5 then FACTDOUBLE(6)
would return 15. It is the product of all the positive integers up to the n
that have the same parity (odd or even) as the n
. For example, if n=6, then 2*4*6*8 = 48 or if n=5, then 1*3*5=15.
FALSE
Returns the logical value FALSE.
Syntax
Return value
The logical value FALSE.
Example
The following formula returns the logical value FALSE.
FLOOR
The FLOOR
function rounds a number down toward zero to the nearest multiple of a specified significance. When the number
is positive, it is rounded down and adjusted toward zero. When the number
is negative, it is rounded down and adjusted away from zero. If the number
is already an exact multiple of the significance
, no rounding occurs.
If either argument is nonnumeric, the function returns an error message.
If the
number
is positive and thesignificance
is negative, the function returns an error message.
Syntax
Parameters
Return value
Rounds a number down to the nearest multiple of Significance.
Example
The following formulas round numbers down to the nearest multiple of Significance.
FLOOR.MATH
The FLOOR.MATH
function rounds a number down to the nearest integer or the nearest multiple of a specified significance.
By default, positive numbers with decimal portions are rounded down to the nearest integer and negative numbers with decimal portions are rounded away from zero by default.
Modify the rounding direction for negative numbers by using 0 or a negative value as the mode. For example, rounding -5.25 with a significance of 1 and a mode of -1 rounds toward zero, resulting in -5.
The significance argument rounds the number down to the nearest integer that is a multiple of the specified significance, unless the number is already an integer. Finally, if dividing the number by a significance of 2 or greater results in a remainder, the number is rounded down.
Syntax
Parameters
Return value
Rounds a number down to the nearest multiple of Significance.
Example
The following formulas rounds a number down to the nearest multiple of Significance.
FLOOR.PRECISE
The FLOOR.PRECISE
function rounds a number down to the nearest integer or the nearest multiple of a specified significance. The number is always rounded down, regardless of its sign. If either the number or the significance is zero, the function returns zero. The function uses the absolute value of the significance, ensuring that the rounding is performed regardless of the signs of the number and significance.
Syntax
Parameters
Return value
Rounds a number down to the nearest multiple of Significance.
Example
The following formula rounds a number down to the nearest multiple of Significance.
GEOMEAN
The GEOMEAN
function calculates the geometric mean of an array or range of positive numbers. Arguments can be numbers, arrays, or names that contain numbers. Logical values and text representations of numbers that are directly entered into the arguments are included in the calculation. If an array contains text, logical values, or empty cells, these are ignored. However, a value of zero are included in the calculation. Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error as well as if any data point is less than or equal to zero, GEOMEAN
returns an error.
Syntax
Parameters
Return value
Returns the geometric average.
Example
The following formula calculates the geometric average of below columns. Note that one of the columns includes negative numbers, therefore, use ABS() function to return absolute values of the column.
HARMEAN
The HARMEAN
function calculates the harmonic mean of a data set, which is the reciprocal of the arithmetic mean of the reciprocals of the data points. The harmonic mean is always less than the geometric mean, which in turn is always less than the arithmetic mean. Arguments can be numbers or names that contain numbers. Logical values and text representations of numbers that are directly entered into the arguments are included in the calculation. If an array or reference contains text, logical values, or empty values, these are ignored. However, arguments or values with a value of zero are included in the calculation. Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error. If any data point is less than or equal to zero, HARMEAN
returns an error.
Syntax
Parameters
Return value
Returns the harmonic average.
Example
The following formula returns the harmonic average of the below columns for every row.
HEX2DEC
The HEX2DEC
function converts a hexadecimal number to its decimal equivalent. If the input is not a valid hexadecimal number, the function returns an error.
Syntax
Parameters
Return value
The decimal number for the hexadecimal number entered.
Example
The following formula calculates the decimal number for the hexadecimal number "CAB007", and result is 13283335.
HOUR
The HOUR
function returns the hour component of a time value as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). Time values are part of a date value and are represented as decimal numbers (e.g., 12:00 PM is represented as 0.5
because it is half of a day).
Syntax
Parameters
Return value
Hour component of given time.
Example
The following formula returns hour component of given time which is 7. Alternatively, use columns to find hours for every row.
IF
The IF
function performs a logical test and returns one value if the test evaluates to TRUE and another value if it evaluates to FALSE. This function is commonly used to create conditional formulas.
Syntax
Parameters
Return value
A logical test result.
Example
The following formula returns female mock first names if person is from Massachusetts and their healthcare coverage is more than 30, otherwise, it returns male mock first names.
IFERROR
The IFERROR
function is used to trap and handle errors in a formula. If a formula results in an error, IFERROR
returns a specified value; otherwise, it returns the result of the formula.
Syntax
Parameters
Return value
The value if it does not contains an error value, or the alternative value if it does.
Example
The following formula returns random digit if, for example, healthcare expense for a patient is zero. Since a number can not be divided by 0, it will show error message.
IFNA
The IFNA
function returns a specified value if a formula results in a N/A
error; otherwise, it returns the result of the formula.
Syntax
Parameters
Return value
The value if it does not contains the N/A (value not available) error value, or the alternative value if it does.
Example
The following formula return mock addresses if there is no address recorded for a row or person in that table.
IFS
The IFS
function checks multiple conditions and returns a value corresponding to the first condition that evaluates to TRUE. This function simplifies the use of multiple nested IF
statements, making it easier to read and manage multiple conditions.
To specify a default result, enter TRUE
as the final condition argument. If none of the other conditions are met, the corresponding value will be returned. For example, if all other conditions fail, a default value can be returned by using TRUE
as the final condition. If a condition argument is provided without a corresponding value, the function will return an error message. If a condition argument evaluates to something other than TRUE or FALSE, the function returns an error. If none of the conditions evaluate to TRUE, the function returns an error.
Syntax
Parameters
Return value
A value that corresponds to the first true condition.
Example
The following formula returns mock female name if "GENDER" column of the table is coded as "F", and mock make name if the column is coded as "M".
INDEX
The INDEX
function returns the value of an element in a table or array based on the specified row and column number indexes. Use the array form of INDEX
when the first argument is an array constant.
If both
row
andcolumn
are provided,INDEX
returns the value in the cell at the intersection of the specified row and column.The
row
andcolumn
must refer to a valid cell within the array; otherwise,INDEX
returns an error.If you set
row
orcolumn
to 0 (zero),INDEX
returns the entire column or row as an range, respectively. To utilize these values as an array, enter theINDEX
function as an array formula.
Syntax
Parameters
Return value
The contents of specified value by row and column number. The column number is optional and defaults to 1.
Example
The following formulas return different results.
Formula above returns [ [HEALTHCARE_COVERAGE, HEALTHCARE_EXPENSES], [LAT, LON] ]
.
Formula above returns [HEALTHCARE_COVERAGE, LAT]
.
Formula above returns [HEALTHCARE_EXPENSES, LON]
.
Formula above returns HEALTHCARE_EXPENSES
.
Formula above returns LON
.
ISBLANK
The ISBLANK
function checks whether a value is empty and returns TRUE
if the cell is blank. If the value contains any data, including a formula that returns an empty string (""
), ISBLANK
returns FALSE
.
Syntax
Parameters
Return value
TRUE
if the value is blank; FALSE
if it contains any data.
Example
The following formula checks if column ZIP is empty.
ISERR
The ISERR
function checks whether a value is an error. It returns TRUE
if the value is any other error type, such as DIV/0!
, VALUE!
, REF!
, NUM!
, NAME?
, or NULL!
. If the value is not an error or is specifically the N/A!
error, ISERR
returns FALSE
.
This function is useful for identifying and handling specific types of errors within a table.
Syntax
Parameters
Return value
TRUE
if the value is an error other than N/A!
; FALSE
if the value is not an error or is N/A!
.
Example
The following formula checks if the value in a specified column and row is an error, excluding N/A!
.
ISERROR
The ISERROR
function checks whether a value is any type of error. It returns TRUE
if the value is an error, such as DIV/0!
, VALUE!
, REF!
, NUM!
, NAME?
, NULL!
, or N/A!
. If the value is not an error, ISERROR
returns FALSE
.
This function is useful for identifying errors within a table, allowing you to manage or correct them as needed.
Syntax
Parameters
Return value
TRUE
if the value is an error; FALSE
if the value is not an error.
Example
The following formula checks if the value in a specific row and column results in an error.
ISEVEN
The ISEVEN
function checks whether a value is an even integer. It returns TRUE
if the value is even, and FALSE
if the value is odd. This function is useful for quickly determining the parity of a value within a table.
Syntax
Parameters
Return value
TRUE
if the value is an even integer; FALSE
if the value is odd.
Example
The following formula checks if the value in Healthcare Expenses column is even.
ISLOGICAL
The ISLOGICAL
function checks whether a value is a logical value, specifically TRUE
or FALSE
. It returns TRUE
if the value is logical, and FALSE
otherwise. This function is useful for verifying whether a value in a table is a logical expression.
Syntax
Parameters
Return value
TRUE
if the value is TRUE
or FALSE
; FALSE
if the value is not logical.
Example
The following formula checks if the value in Healthcare Expenses column is a logical value.
ISNA
The ISNA
function checks whether a value is the N/A!
error. It returns TRUE
if the value is N/A!
, and FALSE
otherwise. This function is useful for identifying missing or unavailable data within a table.
Syntax
Parameters
Return value
TRUE
if the value is the N/A!
error; FALSE
if the value is not.
Example
The following formula checks if the value in Healthcare Expenses column results in a N/A!
error.
ISNONTEXT
The ISNONTEXT
function checks whether a value is not text. It returns TRUE
if the value is not text or if the value is blank, and FALSE
if the value is text. This function is useful for distinguishing non-text entries within a table. An empty string (""
) is considered text.
Syntax
Parameters
Return value
TRUE
if the value is not text or is blank; FALSE
if the value is text.
Example
The following formula checks if the value in Healthcare Expenses column is not text or is blank.
ISNUMBER
The ISNUMBER
function checks whether a value is numeric. It returns TRUE
if the value is a number, and FALSE
otherwise. This function is useful for identifying numeric entries within a table.
Syntax
Parameters
Return value
TRUE
if the value is numeric; otherwise, FALSE
.
Example
The following formula checks if the value in Healthcare Expenses column is numeric or not..
ISODD
The ISODD
function checks whether a number is odd. It returns 1
if the number is odd, and 0
if the number is even. This function is useful for determining the parity of a number within a table. If the number is nonnumeric, ISODD
returns an error.
Syntax
Parameters
Return value
0
if the value is an even integer; 1
if the value is odd.
Example
The following formula checks if the value in Healthcare Expenses column is odd or even.
ISTEXT
The ISTEXT
function checks whether a value is text. It returns TRUE
if the value is text, and FALSE
if it is not. This function is useful for identifying text entries within a table.
Syntax
Parameters
Return value
TRUE
if the value is text; otherwise, FALSE
.
Example
The following formula checks if the value in Healthcare Expenses column is text.
LEFT
The LEFT
function returns a specified number of characters from the left side of a string. To determine the number of characters in a string, use the LEN
function.
Syntax
Parameters
Return value
The input text capped by a specified character length.
Example
The following formula returns random number of characters from the start of a text string in "STATE" column.
For example, is column filled with state "Massachusetts" for the next 6 rows, it will return random number of character from the start of "Massachusetts" such as, "Massach, Massa, Ma, Mass, Massachu, M".
LEN
The LEN
function returns a Long
value representing the number of characters in a string or the number of bytes required to store a variable.
Syntax
Parameters
Return value
Length of a given text.
Example
The following formula the length value of Birthplace column.
LN
The LN
function returns the natural logarithm of a specified number. Natural logarithms are based on the mathematical constant e
(approximately 2.71828182845904). The LN
function is the inverse of the EXP
function.
Syntax
Parameters
Return value
The natural logarithm of the number.
Example
The following formula returns the natural logarithm of the numbers in the column of Healthcare Expenses.
LOG
The LOG
function returns the logarithm of a specified number to a base that you define.
Syntax
Parameters
Return value
The logarithm of a number to the specified base.
Example
The following formula returns the logarithm of Healthcare Expenses column numbers to the base of 2.
LOG10
The LOG10
function returns the base-10 logarithm of a specified number.
Syntax
Parameters
Return value
The base-10 logarithm of a number.
Example
The following formula returns the base-10 logarithm of Healthcare Expenses column values or numbers.
LOWER
The LOWER
function converts all uppercase letters in a text string to lowercase.
Syntax
Parameters
Return value
Text converted to lowercase.
Example
The following formula returns "ADDRESS" column converted to lowercase texts.
MATCH
The MATCH
function searches for a specified value in a range and returns the relative position of that value within the range.
Syntax
Parameters
Return value
The relative position of an item in an array that matches a specified value.
Example
The following formula checks the value "Massachusetts" in given array and returns the number 3 since that word appears in the "STATE" column.
MAX
The MAX
function returns the largest value from a set of specified values.
The arguments can be numbers, names or arrays.
Logical values and text representations of numbers that are directly entered into the list of arguments are included in the calculation.
If an argument is an array, only the numeric values within that array are considered. Empty values, logical values, or text within the array are ignored.
If no numbers are provided in the arguments,
MAX
returns0
.Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you need to include logical values and text representations of numbers in a reference as part of the calculation, use the
MAXA
function.
Syntax
Parameters
Return value
The maximum value in a list of arguments.
Example
The following formula returns the maximum value in the given list which is 55.
MAXA
The MAXA
function returns the largest value from a list of arguments, considering numbers, logical values, and text representations of numbers.
Arguments can include numbers, names, arrays, text representations of numbers, or logical values (
TRUE
orFALSE
) within a reference.Logical values and text representations of numbers directly entered into the arguments are included in the calculation.
If an argument is an array, only the values within that array are used. Empty cells and text values in the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
Arguments containing
TRUE
are evaluated as 1, while arguments containing text orFALSE
are evaluated as 0.If the arguments contain no values,
MAXA
returns 0.If you do not want to include logical values and text representations of numbers in the calculation, use the
MAX
function instead.
Syntax
Parameters
Return value
The maximum value in a list of arguments.
Example
The following formula returns the maximum value in the given list which is 55.
MEDIAN
The MEDIAN
function returns the median of a given set of numbers. The median is the middle value in a sorted list of numbers.
If there is an even number of values in the set,
MEDIAN
calculates the average of the two middle numbers.Arguments can be numbers or names, arrays that contain numbers.
Logical values and text representations of numbers directly entered into the arguments are included in the calculation.
If an array argument contains text, logical values, or empty values, those values are ignored; however, cells with a value of zero are included.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
Syntax
Parameters
Return value
The median of a set of numbers.
Example
The following formula returns the median of a set of given numbers, which is 15.
MIN
The MIN
function returns the smallest number in a set of values.
Arguments can be numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers directly entered into the arguments are included in the calculation.
If an argument is an array, only the numeric values within that array are considered. Empty values, logical values, or text within the array are ignored.
If no numbers are provided,
MIN
returns 0.Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
MINA
function.
Syntax
Parameters
Return value
The minimum value in a list of arguments.
Example
The following formula returns the minimum value in a list of given arguments, which is TRUE (1).
MINA
The MINA
function returns the smallest value from a list of arguments, considering numbers, logical values, and text representations of numbers.
Syntax
Parameters
Return value
The minimum value in a list of arguments.
Example
The following formula returns the minimum value in a list of given arguments, which is -14.
MINUTE
The MINUTE
function returns the minute component of a time value as an integer, ranging from 0 to 59. Time values are a portion of a date value and are represented as a decimal number (e.g., 12:00 PM is represented as 0.5
since it is half of a day).
Syntax
Parameters
Return value
Minute component of given time.
Example
The following formula returns minute component of given time, 4:30:45 PM which is 30. Alternatively, use a column, such as "START" to return minutes.
MOD
The ISTEXT
function checks whether a value is text. It returns TRUE
if the value is text, and FALSE
if it is not. This function is useful for identifying text entries within a table.
If the divisor is 0,
MOD
returns the#DIV/0!
error value.The
MOD
function can be expressed using theINT
function as follows:MOD(n, d) = n - d*INT(n/d)
Syntax
Parameters
Return value
The remainder when one integer is divided by another.
Example
The following formula returns the remainders when integers with different signs is divided by integers with different signs.
MONTH
The MONTH
function returns the month of a date represented by a serial number. The month is provided as an integer ranging from 1 (January) to 12 (December).
Values returned by the YEAR
, MONTH
, and DAY
functions are based on the Gregorian calendar, regardless of the display format of the provided date.
Syntax
Parameters
Return value
The month for the given date value.
Example
The following formula returns the month for the given date value such as birthdate column.
NA
The NA
function returns the error value N/A
, which stands for "no value is available." This error is useful for marking missing information. By entering N/A
where data is missing, you can prevent empty values from being unintentionally included in calculations. When a formula references a value marked as N/A
, it returns the N/A
error.
You must include the empty parentheses
()
with the function name; otherwise, it will not be recognized as a function.
Syntax
Parameters
Return value
N/A error value.
Example
The following formula checks N/A error value.
NOT
The NOT
function reverses the logical value of its argument. If the argument is TRUE
, NOT
returns FALSE
, and if the argument is FALSE
, NOT
returns TRUE
. One common use of the NOT
function is to enhance the functionality of other logical functions, such as IF
. By using NOT
within the logical test of an IF
function, you can test multiple conditions and control the flow of logic based on reversed outcomes.
Syntax
Parameters
Return value
Complements (inverts) a logical value.
Example
The following formula returns mock female name if gender is not male and healthcare expenses is less than 100, otherwise, mock male name.
ODD
The ODD
function rounds a number up to the nearest odd integer.
If the
number
is nonnumeric, the function returns an error.The function always rounds a value up and away from zero, regardless of its sign. If the
number
is already an odd integer, no rounding occurs.
Syntax
Parameters
Return value
A positive number rounded up to the nearest odd integer and a negative number rounded down to the nearest odd integer.
Example
The following formulas return positive numbers rounded up to the nearest odd integers and negative numbers rounded down to the nearest odd integers.
OR
The OR
function returns TRUE
if any of its arguments evaluate to TRUE
, and returns FALSE
if all arguments evaluate to FALSE
.
The arguments must evaluate to logical values, such as
TRUE
orFALSE
, or be arrays that contain logical values.If an array or range argument contains text or empty values, those are ignored.
If no logical values are found in the specified range,
OR
returns an error.You can use an
OR
array formula to check if a value occurs within an array.
Syntax
Parameters
Return value
TRUE
if at least one argument is TRUE
.
Example
The following formula will return TRUE
if one of the conditions below is TRUE
.
PI
The PI
function returns the mathematical constant pi (π), accurate to 15 digits, which is approximately 3.14159265358979.
Syntax
Parameters
The PI
function does not require any arguments. It simply returns the value of π.
Return value
Returns 3.14159265358979, the value of the mathematical constant PI to 14 decimal places.
Example
The following formula returns the area of a circle with the radius of 5 which is 78.53981633974483.
POWER
The POWER
function returns the result of a base number raised to a specified power. You can also use the ^
operator as an alternative to the POWER
function, such as 4^3
, to indicate that the base number (4) is raised to the power of 3.
Syntax
Parameters
Return value
A number raised to another number.
Example
The following formula raises 1.1 to 3 which is 1.331 or raises amount to exponent.
PRODUCT
The PRODUCT
function multiplies all the numbers provided as arguments and returns the product. For example, if values are 3
and 4
, you can use the formula PRODUCT(3, 4)
to multiply these two numbers. The same operation can also be performed using the multiplication (*
) operator, such as 3 * 4
. The PRODUCT
function is particularly useful when you need to multiply many values together.
Syntax
Parameters
Return value
Product of numbers.
Example
The following formula returns product of numbers which is 120. Or use columns to find their product result for every row.
Alternatively, the same result can be derived from the following formulas as well:
PRODUCT({2,3,4,5})
or 2*3*4*5
PROPER
The PROPER
function capitalizes the first letter of each word in a text string and any other letters that follow a non-letter character. It converts all other letters to lowercase.
Syntax
Parameters
Return value
Capitalized words or texts.
Example
The following formula can capitalize any texts below which can be "5-Star 99Hotels Amsterdam", an address from the address column or mock address.
PV
The PV
function returns the present value of an annuity based on periodic, fixed payments to be made in the future and a fixed interest rate. The present value is the total amount that a series of future payments is worth now.
An annuity is a series of fixed payments made over time, such as a mortgage or a savings plan.
The
rate
andnper
arguments must be based on the same units of time. For example, ifrate
is calculated using months,nper
should also be calculated using months.In financial functions, cash outflows (such as deposits or payments) are represented by negative numbers, while cash inflows (such as dividends) are represented by positive numbers.
Syntax
Parameters
Return value
The present value of an investment.
Example
The following formula calculates the present value of a 4-year loan with an annual interest rate of 6% and monthly payments of $250.99 is approximately $10687 or use relevant columns.
QUARTER
The QUARTER
function returns the quarter of the year for a given date, represented as a number from 1 to 4, where:
1 corresponds to January – March,
2 corresponds to April – June,
3 corresponds to July – September,
4 corresponds to October – December.
Syntax
Parameters
Return value
An integer from 1 to 4, representing the quarter of the year.
Example
The following formula returns 3 as 24 of August falls in 3rd quarter (July – September). Or use columns to find the quarters of every row.
QUOTIENT
The QUOTIENT
function returns the integer portion of a division, discarding the remainder. This function is useful when you only need the whole number result of a division.
Syntax
Parameters
Return value
Integer part of a division.
Example
The following formula returns -2.
RADIANS
The RADIANS
function converts an angle from degrees to radians.
Syntax
Parameters
Return value
Degrees that is converted to radians.
Example
The following formula returns 180 radians that is converted from degrees which is PI (π).
RAND
The RAND
function returns a random real number that is evenly distributed between 0 (inclusive) and 1 (exclusive). Each time the worksheet recalculates, a new random number is generated.
Syntax
Parameters
The RAND
function does not require any arguments. To generate a random real number between two specified values a
and b
, use the following formula:
Return value
A random number between 0 and 1.
Example
The following formula returns random numbers between 3 and 5 which are 3.0243019580636967, 3.6078301717905408, 4.040270917581723 etc.
RANDBETWEEN
The RANDBETWEEN
function returns a random integer between the specified lower and upper bounds. Each time the worksheet recalculates, a new random integer is generated.
Syntax
Parameters
Return value
A random integer between two numbers.
Example
The following formula returns numbers between 3 and 5 which are only 3, 4 or 5.
REPLACE
The REPLACE
function replaces part of a text string with a different text string, based on the number of characters you specify.
Syntax
Parameters
Return value
Part of a string with a new string.
Example
The following first formula returns "Hello Moon!". The second formula adds "004A" at the end of the passport numbers and replaces 7 characters starting at 6th character.
RIGHT
The RIGHT
function returns a specified number of characters from the right side of a string.
Syntax
Parameters
Return value
The input text starting from a specified character index.
Example
The following first formula returns "Earth!". The second formula returns random number of characters starting from the right of the text (state name).
ROMAN
The ROMAN
function converts an Arabic numeral to a Roman numeral, returning the result as text.
Syntax
Parameters
Return value
Numbers that are converted to roman form.
Example
The following formulas return relevant roman forms.
ROUND
The ROUND
function rounds a number to a specified number of digits.
If
Count
is greater than 0, theNumber
is rounded to the specified number of decimal places.If
Count
is 0, theNumber
is rounded to the nearest integer.If
Count
is less than 0, theNumber
is rounded to the left of the decimal point.To always round up (away from zero), use the
ROUNDUP
function.To always round down (toward zero), use the
ROUNDDOWN
function.
Syntax
Parameters
Return value
A number that is rounded to a certain number of decimal places.
Example
The following formulas round the numbers to various decimal places.
ROUNDDOWN
The ROUNDDOWN
function rounds a number down, toward zero.
ROUNDDOWN
behaves similarly toROUND
, except that it always rounds a number down.If
Count
is greater than 0, thenumber
is rounded down to the specified number of decimal places.If
Count
is 0, thenumber
is rounded down to the nearest integer.If
Count
is less than 0, thenumber
is rounded down to the left of the decimal point.
Syntax
Parameters
Return value
A number rounded down, toward zero, to a certain precision.
Example
The following formulas round down the numbers to various decimal places.
ROUNDUP
The ROUNDUP
function rounds a number up, away from 0 (zero).
ROUNDUP
behaves similarly toROUND
, except that it always rounds a number up.If
Count
is greater than 0, theNumber
is rounded up to the specified number of decimal places.If
Count
is 0, theNumber
is rounded up to the nearest integer.If
Count
is less than 0, theNumber
is rounded up to the left of the decimal point.
Syntax
Parameters
Return value
A number rounded up, away from zero, to a certain precision.
Example
The following formulas round up the numbers to various decimal places.
SECOND
The SECOND
function returns the seconds component of a time value, as an integer ranging from 0 to 59.
Syntax
Parameters
Return value
Second component of given time.
Example
The following formulas calculate second component of given time, which is 55 in the first formula. Regarding second one, it calculates according to the value provided in the start column.
SIN
The SIN
function returns the sine of a given angle. If your angle is in degrees, multiply it by PI()/180
or use the RADIANS
function to convert it to radians before using the SIN
function.
Syntax
Parameters
Return value
The sine of the given angle (in radians).
Example
The following formula calculates sine of 30 degrees which is 0.5.
SINH
The SINH
function returns the hyperbolic sine of a given number.
Syntax
Parameters
Return value
The hyperbolic sine of the given value.
Example
The following formula calculates the hyperbolic sine of 0.02546 * 1.468
which is 0.37.
SQRT
The SQRT
function returns the positive square root of a given number.
Syntax
Parameters
Return value
The positive square root of a number.
Example
The following formula calculates the positive square root of a 49 which is 7. Alternatively, find square roots of all values in a give column, here "PAYER_COVERAGE".
STDEV
The STDEV
function estimates the standard deviation based on a sample. The standard deviation measures how much values in a dataset deviate from the average (mean).
STDEV
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theSTDEV.P
function instead.The standard deviation is calculated using the "n-1" method, which adjusts for the fact that the data is a sample rather than the entire population.
Arguments can be numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
STDEVA
function.
Syntax
Parameters
Return value
Standard deviation of a sample.
Example
The following formula calculates standard deviation of the sample below which is 26.7
STDEV.P
The STDEVP
function calculates the standard deviation based on the entire population provided as arguments. The standard deviation measures how much the values in a dataset deviate from the average (mean).
Syntax
Parameters
Return value
Standard deviation of a population.
Example
The following formula calculates standard deviation of the population below which is 25.4.
STDEV.S
The STDEV.S
function estimates the standard deviation based on a sample, ignoring logical values and text in the sample. The standard deviation measures how much the values in a dataset deviate from the average (mean).
STDEV.S
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theSTDEV.P
function instead.The standard deviation is calculated using the "n-1" method.
Arguments can be numbers, names, arrays, or values that contain numbers.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
STDEVA
function.
Syntax
Parameters
Return value
Standard deviation of a sample.
Example
The following formula calculates standard deviation of the sample below which is 26.7.
STDEVA
The STDEVA
function estimates the standard deviation based on a sample, considering numbers, text representations of numbers, and logical values. The standard deviation measures how much values in a dataset deviate from the average (mean).
STDEVA
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theSTDEVPA
function instead.The standard deviation is calculated using the "n-1" method.
Arguments can include numbers, names, arrays, text representations of numbers, or logical values such as
TRUE
andFALSE
.Arguments containing
TRUE
are evaluated as 1; arguments containing text orFALSE
are evaluated as 0.If an argument is an array, only the values within that array are considered. Empty values and text within the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you do not want to include logical values and text representations of numbers in the calculation, use the
STDEV
function instead.
Syntax
Parameters
Return value
Standard deviation of the sample.
Example
The following formula calculates standard deviation of the sample below which is 26.7.
STDEVP
The STDEVP
function calculates the standard deviation based on the entire population provided as arguments. The standard deviation measures how much values in a dataset deviate from the average (mean).
STDEVP
assumes that its arguments represent the entire population. If your data represents only a sample of the population, use theSTDEV
function instead.For large sample sizes,
STDEV
andSTDEVP
return approximately equal values.The standard deviation is calculated using the "n" method.
Arguments can be numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
STDEVPA
function.
Syntax
Parameters
Return value
Standard deviation of a population.
Example
The following formula calculates standard deviation of the population below which is 25.4.
STDEVPA
The STDEVPA
function calculates the standard deviation based on the entire population provided as arguments, including text and logical values. The standard deviation measures how much values in a dataset deviate from the average (mean).
STDEVPA
assumes that its arguments represent the entire population. If your data represents a sample of the population, use theSTDEVA
function instead.For large sample sizes,
STDEVA
andSTDEVPA
return approximately equal values.The standard deviation is calculated using the "n" method.
Arguments can include numbers, names, arrays, text representations of numbers, or logical values such as
TRUE
andFALSE
.Text representations of numbers entered directly into the argument list are included in the calculation.
Arguments containing
TRUE
are evaluated as 1, while arguments containing text orFALSE
are evaluated as 0.If an argument is an array, only the values within that array are considered. Empty values and text within the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you do not want to include logical values and text representations of numbers in the calculation, use the
STDEVP
function.
Syntax
Parameters
Return value
Standard deviation of a population.
Example
The following formula calculates standard deviation of the population below which is 25.4.
SUBSTITUTE
The SUBSTITUTE
function replaces specific text within a text string with new text. Use SUBSTITUTE
when you want to replace specific occurrences of text in a string; use REPLACE
when you want to replace text based on its position in the string.
Syntax
Parameters
Return value
String where occurrences of Old_text
are replaced by New_text
. It replaces only specific occurrence if last parameter is provided.
Example
The following first formula substitutes third instance of "2" with "3" which returns "April 2, 2013". The second one, substitutes first instance of "X" with "S" which returns the first characters of passport numbers as "S".
SUM
The SUM
function adds values together.
Syntax
Parameters
Return value
The values of the specified arguments that are summed up.
Example
The following formula sums up the values of the arguments below which are healthcare coverage, another number and an array .
SUMIF
The SUMIF
function is used to sum values in a range that meet specific criteria.
Syntax
Parameters
Return value
The values that belong to the specified range and meet the specified condition that are summed up.
Example
The following formula calculates the sum of the healthcare expenses that are over $1414.45.
SWITCH
The SWITCH
function evaluates one value (referred to as the expression) against a list of values and returns the result corresponding to the first matching value. If no match is found, an optional default value may be returned.
Syntax
Parameters
Return value
A list of arguments, consisting of an expression followed by a value.
Example
The following formula returns "Horse".
TAN
The TAN
function returns the tangent of a given angle. If the angle is in degrees, multiply it by PI()/180
or use the RADIANS
function to convert it to radians before using the TAN
function.
Syntax
Parameters
Return value
The tangent of the given angle (in radians).
Example
The following formula calculates the tangent of the 45 degrees (in radians) which is 1.
TANH
The TANH
function returns the hyperbolic tangent of a given number.
Syntax
Parameters
Return value
The hyperbolic tangent of the given value.
Example
The following formula calculates the hyperbolic tangent of -1.5 which is -0.9.
TODAY
The TODAY
function returns the current date.
Syntax
Parameters
The TODAY
function has no arguments.
Return value
An integer representing the current date as the number of full days since nullDate.
Example
The following formula calculates the age a person who was born in 1998.
TRIM
The TRIM
function removes all spaces from a text string except for single spaces between words. Use TRIM
on text that may have irregular spacing, often when text is imported from another application.
Syntax
Parameters
Return value
All spaces that are removed from a text string.
Example
The following formulas remove leading and trailing spaces from the text below and return "Senatus Populusque Romanus", or remove "ADDRESS" column.
TRUE
The TRUE
function returns the logical value TRUE
. Use this function to return TRUE
based on a condition.
For example:
IF(2=2,TRUE(), FALSE())
returnsTRUE
if the value 2 is equal to 2.
You can also enter the value TRUE
directly into formulas without using the function.
For example:
IF(2=2,TRUE, FALSE)
also returnsTRUE
if the condition is met.
If the condition is not met, both examples return FALSE
.
Syntax
Parameters
The TRUE
function does not require any arguments.
Return value
The logical value that is set to TRUE.
Example
The following formula returns TRUE since 2 is equal to 2.
UPPER
The UPPER
function converts text to uppercase.
Syntax
Parameters
Return value
The text that is converted to uppercase.
Example
The following formula returns the text that is converted to uppercase which is "HELLO WORLD!". Or use UPPER to convert all addressess to uppercase.
VAR
The VAR
function calculates the variance based on a sample of a population.
VAR
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theVARP
function instead.Arguments can be numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values in the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
VARA
function.
Syntax
Parameters
Return value
Variance of a sample.
Example
The following first formula calculates variance of the sample below which is 714.23. The second one calculates variance of given columns for every row.
VAR.P
The VAR.P
function calculates the variance based on the entire population, ignoring logical values and text.
VAR.P
assumes that its arguments represent the entire population. If your data represents only a sample of the population, use theVAR.S
function instead.Arguments can include numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
VARPA
function.
Syntax
Parameters
Return value
Variance of a population.
Example
The following formula calculates variance of the population below which is 642.81. The second one calculates variance of the population for given columns.
VAR.S
The VAR.S
function estimates variance based on a sample, ignoring logical values and text.
VAR.S
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theVAR.P
function instead.Arguments can include numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
VARA
function.
Syntax
Parameters
Return value
Variance of a sample.
Example
The following formula calculates variance of the sample below which is 714.23. The second one calculates variance of the sample for given columns.
VARA
The VARA
function estimates variance based on a sample, considering numbers, text representations of numbers, and logical values.
VARA
assumes that its arguments represent a sample of the population. If your data represents the entire population, use theVARPA
function instead.Arguments can include numbers, names, arrays, text representations of numbers, or logical values such as
TRUE
andFALSE
.Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
Arguments containing
TRUE
evaluate as 1.Arguments containing text or
FALSE
evaluate as 0.
If an argument is an array, only the values within that array are considered. Empty values and text within the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you do not want to include logical values and text representations of numbers in the calculation, use the
VAR
function.
Syntax
Parameters
Return value
Variance of a sample.
Example
The following formula calculates variance of the sample below which is 714.23. The second one calculates variance of the sample for given columns.
VARP
The VARP
function calculates the variance based on the entire population.
VARP
assumes that its arguments represent the entire population. If your data represents a sample of the population, use theVAR
function instead.Arguments can include numbers, names, arrays, or values that contain numbers.
Logical values and text representations of numbers entered directly into the argument list are included in the calculation.
If an argument is an array, only the numbers within that array are considered; empty values, logical values, text, or error values in the array are ignored.
Arguments that contain error values or text that cannot be converted into numbers will cause the function to return an error.
If you want to include logical values and text representations of numbers in the calculation, use the
VARPA
function.
Syntax
Parameters
Return value
Variance of a population.
Example
The following formula calculates variance of the population below which is 642.81. The second one calculates variance of the population for given columns.
WEEKNUM
The WEEKNUM
function returns the week number of a specific date. For example, the week containing January 1 is considered the first week of the year and is numbered as week 1.
Syntax
Parameters
Return value
The week number in the year.
Example
The following formulas calculate the week number in the year.
XOR
The XOR
function returns a logical Exclusive Or (XOR) of all the provided arguments.
The arguments must evaluate to logical values such as
TRUE
orFALSE
, or be in arrays or references that contain logical values.If an array or reference argument contains text or empty cells, those values are ignored.
If the specified range contains no logical values,
XOR
returns the#VALUE!
error.You can use an XOR array formula to check if a value occurs in an array.
The result of
XOR
isTRUE
when the number ofTRUE
inputs is odd andFALSE
when the number ofTRUE
inputs is even.
Syntax
Parameters
Return value
TRUE if an odd number of arguments evaluates to TRUE.
Example
The following formula returns TRUE if odd number of arguments (only one or 3) evaluates to TRUE, otherwise, FALSE.
YEAR
The YEAR
function returns the year corresponding to a given date as an integer between 1900 and 9999. The values returned by the YEAR
, MONTH
, and DAY
functions will be Gregorian values, regardless of the display format for the supplied date.
Syntax
Parameters
Return value
The year as a number according to the internal calculation rules.
Example
The following first formula returns 2012 as a number according to the internal calculation rules. The second formula will return only year from the birth date column.
Info: The below functions are planned to be introduced in the future releases of Syntho.
Planned Functions for future releases
Last updated