Formulas in Blazor Spreadsheet component

3 Jul 202515 minutes to read

Formulas enable calculations within a worksheet by referencing cells from either the same worksheet or other worksheets in the workbook.

Formula Bar

The Formula Bar simplifies editing or entering cell data. The ShowFormulaBar property is used to enable or disable the Formula Bar. The default value of the ShowFormulaBar property is true.

Working with Formulas via the UI

Formulas in the Syncfusion Blazor Spreadsheet can be accessed and inserted using the following methods:

  • Select Insert Function from the Formulas tab in the Ribbon toolbar. In the Insert Function dialog, choose a category, then select the desired function to insert it into the selected cell.

Insert Function Dialog

  • Type (=) in a cell or the Formula Bar to display a list of available functions. Select a function from the list to insert it into the cell.

Formulas Intellisense

  • Click the Insert Function button next to the Formula Bar to open the Insert Function dialog, which provides the same categorized function list and insertion options as the Ribbon toolbar.

Insert Function Button

Calculation Mode

The Spreadsheet includes Calculation Option functionality, similar to Excel’s calculation settings, which controls when and how formulas are recalculated. The available modes are:

  • Automatic: Formulas recalculate instantly when any dependent cell changes.

  • Manual: Formulas recalculate only when explicitly triggered using the Calculate Sheet or Calculate Workbook options.

Automatic

In Automatic Mode, formulas are recalculated instantly whenever a dependent cell is modified. This mode is ideal for scenarios requiring real-time updates, ensuring the most current results are displayed without manual intervention.

Example:

If cell C1 contains the formula =A1 + B1, and the value in A1 or B1 changes, C1 will automatically update to reflect the new result.

Manual

In Manual Mode, formulas are not recalculated automatically when cell values change. Instead, recalculations must be triggered manually. This mode is especially useful for improving performance when working with large datasets or complex formulas, where automatic updates might slow down the Spreadsheet.

Example:

If cell C1 contains the formula =A1 + B1, and the value in A1 or B1 changes, C1 will not update until a manual recalculation is performed. The Spreadsheet provides two options for manual recalculation:

Calculate Sheet: Recalculates formulas for the active sheet only.

Calculate Workbook: Recalculates formulas across all sheets in the workbook.

Named Ranges

The Named Ranges support allows to assign a meaningful name to a specific cell or range of cells. This simplifies referencing and managing data within the Spreadsheet. Named Ranges can also be used in formulas, making them easier to read, understand, and maintain.

NOTE

Named Ranges can be defined only for cells or ranges that contain values.

Creating Named Ranges via the UI

Named Ranges can be created using the following methods:

  • Select the desired range of cells and enter a name in the Name Box.

  • Select the range of cells, then click the Name Manager button in the Ribbon toolbar under the Formulas tab.

Name Manager Dialog

Editing or Deleting Named Ranges

Named Ranges are managed through the Name Manager dialog, which supports editing and deletion.

To edit a Named Range:

  • Open the Name Manager dialog.

  • Select the Named Range to be edited.

  • Click the Edit icon.

  • Modify the name, range, or scope as needed.

  • Click the Update Range button, then click OK button to save changes.

To delete a Named Range:

  • Open the Name Manager dialog.

  • Select the Named Range to be deleted.

  • Click the Delete icon, then click OK button to confirm.

NOTE

Deleting a Named Range used in formulas may cause formula errors. Ensure the Named Range is not referenced before deleting it.

Edit and Delete - Named Range

Supported Formulas

The Spreadsheet component supports a wide range of built-in formulas, enabling powerful data analysis and manipulation. Below is the list of formulas supported in the Spreadsheet component:

Functions

Description

ABS

Returns the absolute value of a number

ACOS

Returns the arccosine of a number

ACOSH

Returns the inverse hyperbolic cosine of a number

ADDRESS

Returns a reference as text to a single cell in a worksheet

AND

Returns TRUE if all of its arguments are TRUE

AREAS

Returns the number of areas in a reference

ARRAYTOTEXT

Returns the text representation of an array, though calculation of this formula result is not supported in XlsIO

ASC

Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters

ASIN

Returns the arcsine of a number

ASINH

Returns the inverse hyperbolic sine of a number

ATAN

Returns the arctangent of a number

ATAN2

Returns the arctangent from x- and y-coordinates

ATANH

Returns the inverse hyperbolic tangent of a number

AVEDEV

Returns the average of the absolute deviations of data points from their mean

AVERAGE

Returns the average of its arguments

AVERAGEA

Returns the average of its arguments, including numbers, text, and logical values

AVERAGEIF

Returns the average (arithmetic mean) of all the cells in a range that meet a given criterion

AVERAGEIFS

Returns the average (arithmetic mean) of all cells that meet multiple criteria

BESSELI

Returns the modified Bessel function In(x)

BESSELJ

Returns the Bessel function Jn(x)

BESSELK

Returns the modified Bessel function Kn(x)

BESSELY

Returns the Bessel function Yn(x)

BIN2DEC

Converts a binary number to decimal

BIN2HEX

Converts a binary number to hexadecimal

BIN2OCT

Converts a binary number to octal

BINOMDIST

Returns the individual term binomial distribution probability

BYCOL

Applies a LAMBDA to each column and returns an array of the results

BYROW

Applies a LAMBDA to each row and returns an array of the results

CEILING

Rounds a number to the nearest integer or to the nearest multiple of significance

CELL

Returns information about the formatting, location, or contents of a cell

CHAR

Returns the character specified by the code number

CHIDIST

Returns the one-tailed probability of the chi-squared distribution

CHIINV

Returns the inverse of the one-tailed probability of the chi-squared distribution

CHITEST

Returns the test for independence

CHOOSE

Chooses a value from a list of values

CHOOSECOLS

Returns specified columns from an array

CHOOSEROWS

Returns specified rows from an array

CLEAN

Removes all non-printable characters from text

CODE

Returns a numeric code for the first character in a text string

COLUMN

Returns the column number of a reference

COLUMNS

Returns the number of columns in a reference

COMBIN

Returns the number of combinations for a given number of objects

COMPLEX

Converts real and imaginary coefficients into a complex number

CONCAT

Combines the text from multiple ranges and/or strings

CONCATENATE

Joins several text items into one text item

CONFIDENCE

Returns the confidence interval for a population mean

CONVERT

Converts a number from one measurement system to another

CORREL

Returns the correlation coefficient between two data sets

COS

Returns the cosine of a number

COSH

Returns the hyperbolic cosine of a number

COUNT

Counts how many numbers are in the list of arguments

COUNTA

Counts how many values are in the list of arguments

COUNTBLANK

Counts the number of blank cells within a range

COUNTIF

Counts the number of non-blank cells within a range that meet the given criteria

COVAR

Returns covariance, the average of the products of paired deviations

CRITBINOM

Returns the smallest value for which the cumulative binomial distribution is less than or equal to a criterion value

CUMIPMT

Returns the cumulative interest paid between two periods

CUMPRINC

Returns the cumulative principal paid on a loan between two periods

DATE

Returns the serial number of a particular date

DATEVALUE

Converts a date in the form of text to a serial number

DAY

Converts a serial number to a day of the month

DAYS360

Calculates the number of days between two dates based on a 360-day year

DB

Returns the depreciation of an asset for a specified period by using the fixed-declining balance method

DDB

Returns the depreciation of an asset for a specified period by using the double-declining balance method or some other method that you specify

DEC2BIN

Converts a decimal number to binary

DECHEX

Converts a decimal number to hexadecimal

DEC2OCT

Converts a decimal number to octal

DEGREES

Converts radians to degrees

DELTA

Tests whether two values are equal

DEVSQ

Returns the sum of squares of deviations

DISC

Returns the discount rate for a security

DOLLAR

Converts a number to text, using the $ (dollar) currency format

DOLLARDE

Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number

DOLLARFR

Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction

DURATION

Returns the annual duration of a security with periodic interest payments

EDATE

Returns the serial number of the date that is the indicated number of months before or after the start date

EFFECT

Returns the effective annual interest rate

EOMONTH

Returns the serial number of the last day of the month before or after a specified number of months

ERF

Returns the error function

ERFC

Returns the complementary error function

ERROR.TYPE

Returns a number corresponding to an error type

EVEN

Rounds a number up to the nearest even integer

EXACT

Checks to see if two text values are identical

EXP

Returns

e

raised to the power of a given number

EXPONDIST

Returns the exponential distribution

FACT

Returns the factorial of a number

FACTDOUBLE

Returns the double factorial of a number

FDIST

Returns the F probability distribution

FIND, FINDB

Finds one text value within another (case-sensitive)

FINV

Returns the inverse of the F probability distribution

FISHER

Returns the Fisher transformation

FISHER

Returns the inverse of the Fisher transformation

FIXED

Formats a number as text with a fixed number of decimals

FLOOR

Rounds a number down, toward zero

FORECAST

Returns a value along a linear trend

FV

Returns the future value of an investment

FVSCHEDULE

Returns the future value of an initial principal after applying a series of compound interest rates

GAMMADIST

Returns the gamma distribution

GAMMAINV

Returns the inverse of the gamma cumulative distribution

GAMMALIN

Returns the natural logarithm of the gamma function, Γ(x)

GCD

Returns the greatest common divisor

GEOMEAN

Returns the geometric mean

GESTEP

Tests whether a number is greater than a threshold value

GROWTH

Returns values along an exponential trend

HARMEAN

Returns the harmonic mean

HEX2BIN

Converts a hexadecimal number to binary

HEX2DEC

Converts a hexadecimal number to decimal

HEX2OCT

Converts a hexadecimal number to octal

HLOOKUP

Looks in the top row of an array and returns the value of the indicated cell

HOUR

Converts a serial number to an hour

HYPERLINK

Creates a shortcut or jump that opens a document stored on a network server, an intranet, or the Internet

HYPGEOMDIST

Returns the hypergeometric distribution

IF

Specifies a logical test to perform

IFERROR

Returns a specified value if a formula evaluates to an error.

IFS

Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition

IMABS

Returns the absolute value (modulus) of a complex number

IMAGINARY

Returns the imaginary coefficient of a complex number

IMARGUMENT

Returns the argument theta, an angle expressed in radians

IMCONJUGATE

Returns the complex conjugate of a complex number

IMCOS

Returns the cosine of a complex number

IMDIV

Returns the quotient of two complex numbers

IMEXP

Returns the exponential of a complex number

IMLN

Returns the natural logarithm of a complex number

IMLOG10

Returns the base-10 logarithm of a complex number

IMLOG2

Returns the base-2 logarithm of a complex number

IMPOWER

Returns a complex number raised to an integer power

IMPRODUCT

Returns the product of from 2 to 29 complex numbers

IMREAL

Returns the real coefficient of a complex number

IMSIN

Returns the sine of a complex number

IMSQRT

Returns the square root of a complex number

IMSUB

Returns the difference between two complex numbers

IMSUM

Returns the sum of complex numbers

INDEX

Uses an index to choose a value from a reference or array

INDIRECT

Returns a reference indicated by a text value

INFO

Returns information about the current operating environment

INT

Rounds a number down to the nearest integer

INTERCEPT

Returns the intercept of the linear regression line

INTRATE

Returns the interest rate for a fully invested security

IPMT

Returns the interest payment for an investment for a given period

IRR

Returns the internal rate of return for a series of cash flows

ISBLANK

Returns TRUE if the value is blank

ISERR

Returns TRUE if the value is any error value except #N/A

ISERROR

Returns TRUE if the value is any error value

ISEVEN

Returns TRUE if the number is even

ISLOGICAL

Returns TRUE if the value is a logical value

ISAN

Returns TRUE if the value is the #N/A error value

ISNONTEXT

Returns TRUE if the value is not text

ISNUMBER

Returns TRUE if the value is a number

ISODD

Returns TRUE if the number is odd

ISMPT

Calculates the interest paid during a specific period of an investment

ISREF

Returns TRUE if the value is a reference

ISTEXT

Returns TRUE if the value is text

KURT

Returns the kurtosis of a data set

LAMBDA

Allows to use own formula parameters and logic

LARGE

Returns the k-th largest value in a data set

LCM

Returns the least common multiple

LEFT, LEFTB

Returns the leftmost characters from a text value

LEN, LENB

Returns the number of characters in a text string

LET

Returns the result of a formula that can use variables. Calculating this formula result is not supported in XlsIO

LN

Returns the natural logarithm of a number

LOG

Returns the logarithm of a number to a specified base

LOG10

Returns the base-10 logarithm of a number

LOGEST

Returns the parameters of an exponential trend

LOGINV

Returns the inverse of the log-normal distribution

LOGNORMDIST

Returns the cumulative log-normal distribution

LOOKUP

Looks up values in a vector or array

LOWER

Converts text to lowercase

MATCH

Looks up values in a reference or array

MAX

Returns the maximum value in a list of arguments

MAXA

Returns the maximum value in a list of arguments, including numbers, text, and logical values

MAXIFS

Returns the maximum value among cells specified by a given set of conditions or criteria

MDETERM

Returns the matrix determinant of an array

MEDIAN

Returns the median of the given numbers

MID, MIDB

Returns a specific number of characters from a text string starting at the position you specify

MIN

Returns the minimum value in a list of arguments

MINA

Returns the smallest value in a list of arguments, including numbers, text, and logical values

MINIFS

Returns the minimum value among cells specified by a given set of conditions or criteria

MINUTE

Converts a serial number to a minute

MINVERSE

Returns the matrix inverse of an array

MIRR

Returns the internal rate of return where positive and negative cash flows are financed at different rates

MMULT

Returns the matrix product of two arrays

MOD

Returns the remainder from division

MODE

Returns the most common value in a data set

MMONTH

Converts a serial number to a month

MROUND

Returns a number rounded to the desired multiple

MULTINOMINAL

Returns the multinomial of a set of numbers

N

Returns a value converted to a number

NA

Returns the error value #N/A

NEGBINOMDIST

Returns the negative binomial distribution

NETWORKDAYS

Returns the number of whole workdays between two dates

NORMDIST

Returns the normal cumulative distribution

NORMINV

Returns the inverse of the normal cumulative distribution

NORMSDIST

Returns the standard normal cumulative distribution

NORMSINV

Returns the inverse of the standard normal cumulative distribution

NOT

Reverses the logic of its argument

NOW

Returns the serial number of the current date and time

NPER

Returns the number of periods for an investment

NPV

Returns the net present value of an investment based on a series of periodic cash flows and a discount rate

OCT2BIN

Converts an octal number to binary

OCT2DEC

Converts an octal number to decimal

OCT2HEX

Converts an octal number to hexadecimal

ODD

Rounds a number up to the nearest odd integer

OFFSET

Returns a reference offset from a given reference

OR

Returns TRUE if any argument is TRUE

PEARSON

Returns the Pearson product moment correlation coefficient

PERCENTILE

Returns the k-th percentile of values in a range

PERCENTRANK

Returns the percentage rank of a value in a data set

PERMUT

Returns the number of permutations for a given number of objects

PI

Returns the value of pi

PMT

Returns the periodic payment for an annuity

POISSON

Returns the Poisson distribution

POWER

Returns the result of a number raised to a power

PPMT

Returns the payment on the principal for an investment for a given period

PROB

Returns the probability that values in a range are between two limits

PRODUCT

Multiplies its arguments

PROPER

Capitalizes the first letter in each word of a text value

PV

Returns the present value of an investment

QUARTILE

Returns the quartile of a data set

QUOTIENT

Returns the integer portion of a division

RADIANS

Converts degrees to radians

RAND

Returns a random number between 0 and 1

RANDBETWEEN

Returns a random number between the numbers you specify

RANK

Returns the rank of a number in a list of numbers

RATE

Returns the interest rate per period of an annuity

RECEIVED

Returns the amount received at maturity for a fully invested security

REPLACE, REPLACEB

Replaces characters within text

REPT

Repeats text a given number of times

RIGHT, RIGHTB

Returns the rightmost characters from a text value

ROMAN

Converts an Arabic numeral to roman, as text

ROUND

Rounds a number to a specified number of digits

ROUNDDOWN

Rounds a number down, toward zero

ROUNDUP

Rounds a number up, away from zero

ROW

Returns the row number of a reference

ROWS

Returns the number of rows in a reference

RSQ

Returns the square of the Pearson product moment correlation coefficient

SEARCH, SEARCHB

Finds one text value within another (not case-sensitive)

SECOND

Converts a serial number to a second

SERIESSUM

Returns the sum of a power series based on the formula

SIGN

Returns the sign of a number

SIN

Returns the sine of the given angle

SINH

Returns the hyperbolic sine of a number

SKEW

Returns the skewness of a distribution

SLN

Returns the straight-line depreciation of an asset for one period

SLOPE

Returns the slope of the linear regression line

SORT

Returns the cell range values in ascending or descending order

SMALL

Returns the k-th smallest value in a data set

SQRT

Returns a positive square root

SQRTPI

Returns the square root of (number * pi)

STANDARDIZE

Returns a normalized value

STDEV

Estimates standard deviation based on a sample

STDEVA

Estimates standard deviation based on a sample, including numbers, text, and logical values

STDEVP

Calculates standard deviation based on the entire population

STDEVPA

Calculates standard deviation based on the entire population, including numbers, text, and logical values

STEYX

Returns the standard error of the predicted y-value for each x in the regression

SUBSTITUTE

Substitutes new text for old text in a text string

SUBTOTAL

Returns a subtotal in a list or database

SUM

Adds its arguments

SUMIF

Adds the cells specified by a given criteria

SUMPRODUCT

Returns the sum of the products of corresponding array components

SUMSQ

Returns the sum of the squares of the arguments

SUMX2MY2

Returns the sum of the difference of squares of corresponding values in two arrays

SUMX2PY2

Returns the sum of the sum of squares of corresponding values in two arrays

SUMXMY2

Returns the sum of squares of differences of corresponding values in two arrays

SWITCH

Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.

SYD

Returns the sum-of-years'digits depreciation of an asset for a specified period

T

Converts its arguments to text

TAN

Returns the tangent of a number

TANH

Returns the hyperbolic tangent of a number

TEXT

Formats a number and converts it to text

TEXTBEFORE

Returns text that occurs before a given character

TEXTJOIN

Combines the text from multiple ranges and/or strings with a delimiter you specify between each text value that will be combined

TEXTSPLIT

Splits the cell text across rows or columns

TIME

Returns the serial number of a particular time

TIMEVALUE

Converts a time in the form of text to a serial number

TOCOL

Transforms an array into a single column

TODAY

Returns the serial number of today's date

TOROW

Transforms an array into a single row

TRANSPORSE

Returns the transpose of an array

TRIM

Removes spaces from text

TRIMMEAN

Returns the mean of the interior of a data set

TRUNC

Truncates a number to an integer

TYPE

Returns a number indicating the data type of a value

UNIQUE

Returns the list of unique values present inside a list or range. Calculating the formula result in XlsIO is not supported.

UPPER

Converts text to uppercase

VALUE

Converts a text argument to a number

VALUETOTEXT

Returns the text from any specified value. Calculating this formula result is not supported in XlsIO.

VAR

Estimates variance based on a sample

VARA

Estimates variance based on a sample, including numbers, text, and logical values

VARP

Calculates variance based on the entire population

VARPA

Calculates variance based on the entire population, including numbers, text, and logical values

VDB

Returns the depreciation of an asset for a specified or partial period by using a declining balance method

VLOOKUP

Looks in the first column of an array and moves across the row to return the value of a cell

WEEKDAY

Converts a serial number to a day of the week

WEEKNUM

Converts a serial number to a number representing where the week falls numerically with a year

WEIBULL

Returns the Weibull distribution

WORKDAY

Returns the serial number of the date before or after a specified number of workdays

XIRR

Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic

XLOOKUP

Returns the value corresponding to the first match it finds else returns the next approximate match. Calculating this formula result is not supported in XlsIO.

XMATCH

Returns the position of a value in a list, table or cell range. Calculating this formula result is not supported in XlsIO.

YEAR

Converts a serial number to a year

YEARFRAC

Returns the year fraction representing the number of whole days between start_date and end_date

ZTEST

Returns the one-tailed probability-value of a z-test

FALSE

Returns the logical value FALSE

TRUE

Returns the logical value TRUE