Miscellaneous Built-in Functions

On this webpage, we provide tables describing built-in Excel worksheet functions that are particularly useful for statistical analysis. Also, see Conditional Excel Functions, Table Lookup Functions, and Excel Statistics Functions.

Basic mathematical functions

Mathematical worksheet functions Excel

Figure 1 – Basic mathematical functions

Some properties of EXP and LN (see also Exponentials and Logs):

Log and Exp properties

Figure 2 – Log and Exp properties

Combinatorial functions

Combinatorial functions

Figure 3 – Combinatorial functions

Note that FACT(n) produces a value for n up to 170. For values higher than 170 an error value is returned. COMBIN(2*n, n) yields a value for n up to 514. PERMUT(2*n, n) produces a value for n up to 134.

Rounding functions

Rounding worksheet functions ExcelFigure 4 – Rounding functions

INT(x) = TRUNC(x, 0) when x ≥ 0 or x is an integer and INT(x) = TRUNC(x, 0) – 1 otherwise.

Integer functions

Integer worksheet functions ExcelFigure 5 – Integer-valued functions

Note that INT(x) = TRUNC(x, 0) when x ≥ 0 and INT(x) = TRUNC(x, 0) – 1 when x < 0.

Random number functions

Random number functions ExcelFigure 6 – Random number functions 

The random numbers generated change every time the cell containing the function is regenerated. To generate a random number value that does not change, enter RAND(), or an expression containing RAND(), and then press the function key F9 followed by Enter.

Sum and related functions

For the examples in Figure 7, let R1 = {4, 6, 7, -3}, R2 = {6, 8, -5, 7}, R3 = {5, “”, “A”, 6, -1}

SUM and related functions

Figure 7 – Sum and related functions

You can also make a count of the unique elements in a data range in Excel. The following array formula counts the number of unique values in range R1 (see below for information about COUNTIF).

      =SUM(1/COUNTIF(R1,R1))

The only problem with this formula is that an error results if R1 contains an empty cell. To correct this, you can use the following array formula:

      =SUM((R1<>””)/COUNTIF(R1,R1&””))

If you replace SUM by SUMPRODUCT then the result is an ordinary formula, and not an array formula, and so you only need to press Enter not Ctrl-Shft-Enter.

To count the number of unique numeric cells in range R1 you can use the following array formula:

      =SUM(IF(FREQUENCY(R1,R1)>0,1))

Once again if you replace SUM with SUMPRODUCT the result is an ordinary formula. In fact when SUMPRODUCT has only one argument then it is equivalent to SUM even when used in array formulas. The reason that these formulas give the desired results is a bit complicated and depends on how Excel treats array formulas, and so it is not necessary for our purposes to go into this further.

The Real Statistics Resource Pack provides the function COUNTU(R1) which counts the number of unique numeric cells in range R1 and COUNTAU(R1) which counts the number of unique cells in range R1 (see Real Statistics Reformatting Functions).

Figure 8 contains some examples of how these formulas are used.

Count unique formulas Excel

Figure 8 – Count of the unique elements in a range

Matrix functions

Excel supports the following matrix functions. These functions are covered in more detail in Matrices and Iterative Procedures.

Matrix functions

Figure 9 – Matrix functions

Excel 2013 introduced the array function MUNIT(n) which returns the n × n identity matrix. Users of previous versions of Excel can use the Real Statistics array function IDENTITY(n) instead. The Real Statistic Resource Pack also provides the MPROD array function where MPROD(R1, R2, R3) = MMULT(R1, MMULT(R2, R3)) and MPROD(R1, R2, R3, R4) = MMULT(MMULT(R1, R2), MMULT(R3, R4)).

Dynamic Array functions

The functions in Figure 10 are only available to Excel 2021 and Excel 365 users.

Dynamic Array Functions

Figure 10 – Dynamic array functions

In addition, the functions shown in Figure 11 are available to Excel 365 users. See Excel Reformatting Functions for more information.

Reformatting functions

Figure 11 – Reformatting  functions

LAMBDA-based functions

The functions in Figure 12 are only available to Excel 365 users. 

LAMBDA-based functions

Figure 12 – LAMBDA-based functions

Reference

Microsoft (2021) Excel functions
https://support.microsoft.com/en-us/office/excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188#bm19

16 thoughts on “Miscellaneous Built-in Functions”

  1. Dear Doc Zaoinitz, there are elementary error, in the table Sum and related functions, in the function count, you have (R1), and really is R3.

    Thanks a lot for your page

    Reply
    • Hello Gerardo,
      I assume that you are referring to Figure 7. I don’t see the error. Can you help me find which part of the table has an error?
      Charles

      Reply
  2. I have been given this table for Chi distribution. No one can find the formula in Excel for it.
    degrees of area to the right of the critical value
    freedom .995 .99 .975 .95 .9

    2 .010 .020 .051 .103 .211
    It goes on; this is just a sample.

    Reply
    • Diane,
      The Excel formula for the chi-square distribution is CHISQ.DIST or CHISQ.DIST.RT. The critical values are calculated using the formula CHISQ.INV or CHISQ.INV.RT.
      Charles

      Reply
  3. The statements in Column I of rows 2 and 3 of Figure 8 should be:

    =SUMIF($B$2:$B$9,$E2,$C$2:$C$9)
    =SUMIF($B$2:$B$9,$E3,$C$2:$C$9)

    The current statements do not account for the data labels

    Reply
    • Hello William,
      This seems to mean that you haven’t installed the software. You need to follow the installation instructions on the webpage from which you downloaded the Real Statistics software.
      Charles

      Reply
  4. Good day Sir,
    I install XRealStats.xlam in my Windows 10 office 2019 but is not working i cannot find it in the Excel tab. i have tried all my possible best but not just working sir.

    Reply
    • Hi Jody,
      Yes. There are many examples on the website. E.g. =AVERAGE(ABS(A1:A40)), the mean of the absolute values of the data elements in range A1:A40. Or =SUM(A1:A4)+1, one more than the sum of the elements in the range A1:A4.
      Charles

      Reply
    • Raza,
      You need to supply additional information. E.g. is there a lower and upper limit for how big a quote can be? Do the quotes follow some distribution?
      Charles

      Reply

Leave a Comment