Unit-3 Formulas and Functions
Unit-3 Formulas and Functions
2. Average function
3. Min function
4. Max function
5. Count function
VAR: VARP:
Syntax: VAR(number1, [number2], …) Syntax: VARP(number1, [number2], …)
Calculates the variance based on a sample Calculates the variance for an entire
from a population. population.
Example: VAR(A1:A10) calculates the variance Example: VARP(A1:A10) calculates the
of values in the range A1 to A10. variance of values in the range A1 to A10 for
the entire population.
CORREL: RAND:
Syntax: CORREL(array1, array2) Syntax: RAND()
Calculates the correlation coefficient between Generates a random number between 0 and
two sets of values. 1.
Example: CORREL(A1:A10, B1:B10) calculates Example: RAND() generates a random
the correlation between the values in ranges number between 0 and 1.
A1 to A10 and B1 to B10.
RANK:
PERCENTILE:
Syntax: RANK(number, range, [order])
Syntax: PERCENTILE(array, k)
, optionally specifying the order (ascending
Calculates the k-th percentile of a dataset.
oReturns the rank of a number within a range
Example: PERCENTILE(A1:A10, 0.5)
of numbersr descending).
calculates the 50th percentile (median) of
Example: RANK(A1, A1:A10, 0) returns the
values in the range A1 to A10.
rank of the value in cell A1 within the range
A1 to A10 in descending order.
OR function
The syntax of the Excel OR
function is very similar to
AND:
OR(logical1, [logical2], …)
IF function with nested OR
=IF(OR(B2>30, C2>20), "Good", "Bad")
The formula returns "Good" if a number in cell B3 is greater than 30 or the
number in C2 is greater than 20, "Bad" otherwise.
XOR function
The syntax of the XOR function is identical to OR's :
XOR(logical1, [logical2],…)
When more logical statements are added, the XOR function in Excel results in:
TRUE if an odd number of the arguments evaluate to TRUE;
FALSE if is the total number of TRUE statements is even, or if all statements are FALSE.
NOT function
The NOT function is one of the simplest Excel functions in terms of syntax:
NOT(logical)
IF Function
The IF function is a premade function in Excel, which returns values based on
a true or false condition.
It is typed =IF and has 3 parts:
=IF(logical_test, [value_if_true], [value_if_false])
IFS Function
The IFS function is a premade function in Excel, which returns values based on one or
more true or false conditions.
It is typed =IFS and has two or more parts:
=IFS(logical_test1, value_if_true1, [logical_test2,value_if_true2], [logical_test3
; ...)
REPT() Function
The REPT() function in Excel allows you to repeat a text string a specified number of times.
It is useful for creating repeated patterns or generating repetitive text values.
Formula: =REPT(text, number_times)
TYPE() Function
The TYPE() function in Excel allows you to determine the type of data contained within a
cell. It returns a numerical code that corresponds to a specific data type. This function is
useful when you need to identify the type of data stored in a cell or a formula result.
Formula: =TYPE(value)
The TYPE function returns the following
numerical codes for different data types:
1: Number
2: Text
4: Logical (Boolean)
16: Error
64: Array
128: Cell reference
LEFT_MID_RIGHT Function
The LEFT, MID, and RIGHT functions in Excel are used to extract parts of a text string. The
LEFT function extracts the first n characters from a text string, the MID function extracts a
specified number of characters from a text string starting at a specified position, and the
RIGHT function extracts the last n characters from a text string.
CONVERT() Function
The CONVERT() function in Excel is a powerful tool for unit conversion. It allows you to
convert a value from one measurement unit to another.
Formula: =CONVERT(number, from_base, to_base)
SUMPRODUCT() Function
The SUMPRODUCT() function in Excel is a versatile tool for performing calculations on
arrays or ranges. It allows you to multiply corresponding values in multiple arrays or ranges
and then sum the products.
Formula: =SUMPRODUCT(array1, array2, …)
IFERROR() Function
The IFERROR() function in Excel allows you to handle and manage errors in formulas. It
helps you control the output or display a specific value when an error occurs. In simple
words 1
The IFERROR function in Excel returns a value you specify if a formula evaluates to an
error; otherwise, it returns the result of the formula
Formula: =IFERROR(formula, value_if_error)