0% found this document useful (0 votes)
37 views13 pages

Spreadsheets

The document discusses spreadsheet formulas and functions. It explains the difference between formulas and functions, provides examples of common operators and symbols used in formulas like =, :, $, !. It also describes some commonly used functions like SUM, PRODUCT, MAX, MIN, AVERAGE with their syntax and examples.

Uploaded by

Piyush Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views13 pages

Spreadsheets

The document discusses spreadsheet formulas and functions. It explains the difference between formulas and functions, provides examples of common operators and symbols used in formulas like =, :, $, !. It also describes some commonly used functions like SUM, PRODUCT, MAX, MIN, AVERAGE with their syntax and examples.

Uploaded by

Piyush Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Spreadsheets

Spreadsheet Formula and Functions


A formula is an expression that operates on values. The values can be directly provided, can be
provided by referring to a range of cells or the combination of the two. These formulas return a
result or prompt an error. Spreadsheet formulas enable you to perform calculations such as
addition, subtraction, multiplication, division, and find out averages, calculate percentages,
manipulate date and time values, and do a lot more.
Note: Formulas in a Spreadsheet always begin with the equal sign (=).
There is another term that is very familiar to Spreadsheet formulas, and that is "function". The two
words, "formulas" and "functions" are sometimes interchangeable. They are closely related, but
yet different. Functions are predefined formulas in Spreadsheets. They eliminate laborious manual
entry of formulas while giving them human-friendly names.
Examples
Formula: =A1+A2+A3, which finds the sum of the range of values from cell A1 to cell A3.
Function: =SUM(A1:A3), is the function that sums all the values from cell A1 to cell A3.

Common Operators and Symbols

∙ Equal sign(=) This marks the beginning of a formula or a function. It signifies that anything
written after this needs to be evaluated. This expression can consist of cell references,
constants, mathematical operators, functions, and more.
For example if we write A1+A2 in the cell, it will be stored as a text whereas if we write
=A1+A2, then the values of the cells A1 and A2 will be added and the result is stored in the
cell.
=A1+B1, (Adds the values in cells A1 and B1)
=F2/G2, (Divides the value in cell F2 by the value in cell G2)
∙ Comma (,) This symbol is used to separate different elements/arguments.
For example if we write
=SUM(A1,A2,A3), a comma is used to separate the 3 arguments provided to the function
named SUM.
=AVERAGE(C1, C2, C3, C4), a comma is used to separate the 4 arguments provided to the
AVERAGE function.
∙ Colon (:) This symbol is used to signify the range when specifying cells.
For example if we have to add the values present in the cells A1, A2, A3, A4 and A5, we could
have written =SUM(A1,A2,A3,A4,A5) but that is laborious, instead we could use the colon
operator and specify the range A1 to A5 as A1:A5. The function now looks like
=SUM(A1:A5) and evaluates to the same result.
=AVERAGE(E1:E5), (Calculates the average of values in cells E1 to E5)
=MAX(I2:K2), ( Finds the maximum value in cells I2, J2, and K2)
∙ Exclamation (!) This symbol helps to specify the sheet name. This helps us to refer to any cell of
any sheet. For example
=Sheet1!A1 can be used to refer to the A1 cell of the sheet named Sheet1. This can be used
across the sheets.
=SUM(Sheet1!A1:A10, Sheet2!B1:B10), (Sums values from both worksheets)
=AVERAGE(Sheet1!C1:C5, Sheet2!C1:C5) (Calculates the average of two ranges from different
sheets)
∙ Dollar ($) The dollar sign in a Spreadsheet cell reference instructs Spreadsheet how to treat the
reference when the formula is moved or copied to other cells. In a nutshell, using the $ sign
before the row and column coordinates makes an absolute cell reference that won't change.
For example if a formula =A1+B1 is written in cell C1, and then we drag the formula to cell
C2, then we get =A2+B2 in cell C2. Instead if the formula =A1+$B$1 is written in cell C1, and
then dragged to cell C2, then we get =A2+B1 in cell C2
=$A$1*B2, (Always refers to cell A1, even formula is dragged to other columns or rows)
=A$1*B2, (Always refers to row 1, but the column reference adjusts as you drag formula
across columns)

Some Basic Spreadsheet Notations


∙ Equal sign(=) This marks the beginning of a formula or a function. It signifies that anything
after this will be evaluated. For example if we write =2+3 in a cell and press enter, it gets
evaluated and 5 gets stored in the cell.
∙ Cell Names A cell is created by the intersection of a row and a column. The cell is named
as the Column Name followed by Row Name. For example cell A3 is the cell from the
intersection of column A and row 3.

Some Functions
1. Function Name: SUM
Description: The SUM function adds values. You can add individual values, cell references or
ranges or a mix of all three.
Syntax: SUM(number1,[number2],...)
where number1 is the compulsory argument which is the first number you want to add.
The number can be like 4, a cell reference like B6, or a cell range like B2:B8. [number2] is
an optional argument which is the second number you want to add. You can specify up to
255 numbers in this way.
For example:
=SUM(10,20,30), (Adds the numbers 10,20 and 30 as 60)
=SUM(-10,20,30), (Adds the numbers -10,20 and 30 as 40)
=SUM(10,A1), (Adds 10 to the value in cell A1)
=SUM(A1, A2, A3, A4, A5), (Adds the values in cells A1 to A5)
=SUM(A2:A10), (Adds the values in cells A2:10)
=SUM(A2:A10, C2:C10), (Adds the values in cells A2:A10, as well as cells C2:C10)
=SUM(A1:A5, $B$1), (Adds values in A1 to A5 along with the fixed value in cell B1)
=SUM(Sheet2!B1:B10), (Adds values from a range in a different sheet)
=SUMIF(A1:A5, ">10"), (Adds values greater than 10 among the cells A1:A5)
2. Function Name: PRODUCT
Description: The PRODUCT function multiplies all the numbers given as arguments and
returns the product. For example, if cells A1 and A2 contain numbers, you can use the
formula =PRODUCT(A1, A2) to multiply those two numbers together. You can also perform
the same operation by using the multiply (*) mathematical operator; for example, =A1 * A2.
The PRODUCT function is useful when you need to multiply many cells together. For
example, the formula =PRODUCT(A1:A3, C1:C3) is equivalent to =A1*A2*A3*C1*C2*C3.
Syntax: PRODUCT(number1,[number2],...)
where number1 is the compulsory argument which is the first number you want to
multiply. The number can be like 4, a cell reference like B6, or a cell range like B2:B8.
[number2] is an optional argument which is the second number you want to multiply. You
can specify up to 255 numbers in this way.
For example:
=PRODUCT(1,2,3), (Multiplies the numbers 1,2 and 3 as 6)
=PRODUCT(-1,2,-3,4), (Multiplies the numbers -1,2,-3 and 4 as 24)
=PRODUCT(-1,2,3,4), (Multiplies the numbers -1,2,3 and 4 as -24)
=PRODUCT(10,A1), (Multiplies 10 to the value in cell A1)
=PRODUCT(A1, A2, A3, A4, A5), (Multiplies the values in cells A1 to A5)
=PRODUCT(A2:A10), (Multiplies the values in cell ranging from A2 to 10)
=PRODUCT(A2:A5, C1:C4), (Multiplies the values in cells A2:A5, as well as cells C1:C4)
=PRODUCT(A1:A5, $B$1), (Multiplies values in A1 to A5 along with the fixed value in cell B1)
=PRODUCT(Sheet2!B1:B10), (Multiplies values from a range in a different sheet)

3. Function Name: MAX


Description: Returns the largest value in a set of values. Arguments can either be numbers or
names, arrays, or references that contain numbers. If an argument is an array or reference,
only numbers in that array or reference are used. Empty cells, logical values, or text in the
array or reference are ignored. If the arguments contain no numbers, MAX returns 0 (zero).
Arguments that are error values or text that cannot be translated into numbers cause errors.
Syntax: MAX(number1,[number2],...)
where number1 is the compulsory argument for the first number. The number can be like 4,
a cell reference like B6, or a cell range like B2:B8. [number2] is an optional argument which
is the second number. You can specify up to 255 numbers in this way.
For example
=MAX(A2:A6), (Returns the largest value in the range A2:A6)
=MAX(A2:A6, 30), (Returns the largest value in the range A2:A6 and the value 30)
=MAX(A1, A3, A5), (Returns the highest value among cells A1, A3, and A5)
=MAX(10, A2, 20), (Returns the highest value among 10, the value in cell A2, and 20)
=MAX(A1:A5, $B$1), (Returns the highest value among cells A1 to A5 along with the fixed
value in cell B1)
=MAXIF(A1:A5, ">10"), (Returns the highest value greater than 10 among cells A1:A5)
4. Function Name: MIN
Description: Returns the smallest value in a set of values. Arguments can either be numbers
or names, arrays, or references that contain numbers. If an argument is an array or reference,
only numbers in that array or reference are used. Empty cells, logical values, or text in the
array or reference are ignored. If the arguments contain no numbers, MIN returns 0 (zero).
Arguments that are error values or text that cannot be translated into numbers cause errors.

Syntax: MIN(number1,[number2],...)
where number1 is the compulsory argument for the first number. The number can be like 4,
a cell reference like B6, or a cell range like B2:B8. [number2] is an optional argument which
is the second number. You can specify up to 255 numbers in this way.
For example
=MIN(A2:A6), (Returns the smallest value in the range A2:A6)
=MIN(A2:A6, 30), (Returns the smallest value in the range A2:A6 and the value 30)
=MIN(A1, A3, A5), (Returns the smallest value among cells A1, A3, and A5)
=MIN(10, A2, 20), (Returns the smallest value among 10, the value in cell A2, and 20)
=MIN(A1:A5, $B$1), (Returns the smallest value among cells A1 to A5 along with the fixed
value in cell B1)
=MINIF(A1:A5, ">10"), (Returns the smallest value greater than 10 among cells A1:A5)

5. Function Name: AVERAGE


Description: Returns the average (arithmetic mean) of the arguments. For example, if the
range A1:A20 contains numbers, the function =AVERAGE(A1:A20) returns the average of
those numbers. Average, which is the arithmetic mean, and is calculated by adding a group
of numbers and then dividing by the count of those numbers. For example, the average of 2,
3, 3, 5, 7, and 10 is (30 divided by 6), which is 5.
Arguments can either be numbers or names, ranges, or cell references that contain
numbers. Logical values and text representations of numbers that you type directly into the
list of arguments are not counted. If a range or cell reference argument contains text, logical
values, or empty cells, those values are ignored; however, cells with the value zero are
included. Arguments that are error values or text that cannot be translated into numbers
cause errors.
Syntax: AVERAGE(number1,[number2],...)
where number1 is the compulsory argument for the first number. The number can be like 4,
a cell reference like B6, or a cell range like B2:B8 if you want the average. [number2] is an
optional argument which is the second number you want the average. You can specify up to
255 numbers in this way.
For example
=AVERAGE(1,2,3,4,5), (Returns the average value of 1, 2, 3, 4, and 5 as 3)
=AVERAGE(A1:A5), (Returns the average value of cells A1 to A5)
=AVERAGE(A1, A2, A3, A4, A5), (Returns the average value of cells A1 to A5)
=AVERAGE(10, A2, 20), (Returns the average value of 10, the value in cell A2, and 20)
=AVERAGEIF(A1:A5, ">10"), (Returns the average value of numbers greater than 10 among
cells A1:A5)
6. Function Name: COUNT
Description: The COUNT function counts the number of cells that contain numbers, and
counts numbers within the list of arguments. Use the COUNT function to get the number of
entries in a number field that is in a range or array of numbers. For example, you can enter
the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20). In this
example, if five of the cells in the range contain numbers, the result is 5.
Arguments that are numbers, dates, or a text representation of numbers (for example,
numbers enclosed in quotation marks, such as "1") are counted. Logical values and text
representations of numbers that you type directly into the list of arguments are counted.
Arguments that are error values or text that cannot be translated into numbers are not
counted. If an argument is an array or reference, only numbers in that array or reference are
counted. Empty cells, logical values, text, or error values in the array or reference are not
counted. If you want to count logical values, text, or error values, use the COUNTA function.
Syntax: COUNT(value1,[value2],...)
where value1 is a compulsory argument which is the first value/range within which you
want to count numbers. The value can be like 4, “A”, “4” etc, a cell reference like B6, or a
cell range like B2:B8. [value2] is an optional argument which is the second number. You can
specify up to 255 numbers in this way.
For example
=COUNT(A1:A5), (Returns the count of cells with numeric values in cells A1 to A5)
=COUNT("Cat", "Dog", 1, 2, 3), (Returns the count of numeric values among ("Cat", "Dog",
1, 2, and 3 as Count = 3)
=COUNTIF(A1:A5, ">10"), (Returns the count of numbers greater than 10 in cells A1 to A5)

7. Function Name: COUNTA


Description: The COUNTA function (Count alphanumeric) counts the number of cells that are
not empty in a range. The COUNTA function counts cells containing any type of information,
including error values and empty text (""). For example, if the range contains a formula that
returns an empty string, the COUNTA function counts that value. The COUNTA function does
not count empty cells. If you do not need to count logical values, text, or error values (in
other words, if you want to count only cells that contain numbers), use the COUNT
function.
Syntax: COUNTA(value1,[value2],...)
where value1 is a compulsory argument which is the first argument representing the values
that you want to count. The value can be like 4, “A”, “4” etc, a cell reference like B6, or a cell
range like B2:B8. [value2] is an optional argument which is the second number. You can
specify up to 255 numbers in this way.
For example
=COUNTA(A1:A5), (Returns the count of non-empty cells in cells A1 to A5)
=COUNTA(A1, A2, A3, A4, A5), (Returns the count of non-empty cells in cells A1 to A5)
=COUNTA("Cat", "Dog", 1, 2, 3), (Returns the count of non-empty cells ("Cat", "Dog", 1, 2,
and 3 as Count = 5)
8. Function Name: FACT
Description: Returns the factorial of a number. The factorial of a number is equal to
1*2*3*...* number. For example =FACT(5) returns the factorial of 5, or 5*4*3*2*1 which is
equal to 120. =FACT(0) return 1, =FACT(1) returns 1, =FACT(4) returns 24.
Syntax: FACT(number)
where number is a compulsory argument which has to be a nonnegative number for which
you want the factorial. If a number is not an integer, it is truncated.
For example
=FACT(0), (Returns factorial of 0 as 1)
=FACT(1), (Returns factorial of 1 as 1)
=FACT(2), (Returns factorial of 2 as 2) i.e. 2 x 1
=FACT(4), (Returns factorial of 4 as 24) i.e. 4 x 3 x2 x 1
=FACT(5), (Returns factorial of 5 as 120) i.e. 5 x 4 x 3 x2 x 1
=FACT(5.5), (Returns factorial of 5 as 120 after truncating decimal part) i.e. 5 x 4 x 3 x2 x 1

9. Function Name: POWER


Description: Returns the result of a number raised to a power. The "^" operator can be used
instead of POWER to indicate to what power the base number is to be raised, such as in
5^2. For example =POWER(5,2) returns 5 squared which is 25.
=POWER(2,5) returns 2*2*2*2*2 which is 32. =POWER(1,3) returns 1 and =POWER(3,3)
returns 27. Any number raised to the power 0 returns 1 and any number raised to the
power 1 returns the number.
Syntax: POWER(number, power)
where both the arguments are compulsory. number is the base number. It can be any real
number. Whereas power denotes exponent number which again can be any real number.
For example
=POWER(2, 3), (Calculates 2 raised to the power of 3 (2^3 = 8))
=POWER(A1, A2), (Calculates the value of A1 raised to the power of A2)
=POWER(2 + 3, 2), (Calculates the value of (2 + 3) raised to the power of 2 (5^2 = 25))
=POWER(5,0), (Returns 1 as result of 5 raised to the power 0)
=POWER(4,1), (Returns 4 as result of 4 raised to the power 1)

10. Function Name: SQRT


Description: Returns a positive square root. For example =SQRT(4) returns the square root of
4 which is 2. =SQRT(-5) returns error. Square root of 0 is 0, square root of 1 is 1
Syntax: SQRT(number)
where number is a compulsory argument which has to be a nonnegative number for which
you want the square root.
For example
=SQRT(36), (Returns 6 as square root of 36)
=SQRT(25), (Returns 5 as square root of 25)
=SQRT(16), (Returns 4 as square root of 16)
=SQRT(9), (Returns 3 as square root of 9)
=SQRT(4), (Returns 2 as square root of 4)
11. Function Name: ABS
Description: Returns the absolute value of a number. The absolute value of a number is the
number without its sign. For example =ABS(2) returns the absolute value of 2 which is 2.
=ABS(-2) return the absolute value of -2 which is 2
Syntax: ABS(number)
where number is a compulsory argument which is the real number of which you want the
absolute value.
For example
=ABS(5), (Returns the absolute value of 5, which is 5)
=ABS(-8), (Returns the absolute value of -8, which is 8)
=ABS(A1), (Returns the absolute value of the number in cell A1)
=ABS(0), (Returns the absolute value of 0, which is 0)
=ABS(-2.5), (Returns the absolute value of -2.5, which is 2.5)

12. Function Name: ROUND


Description: The ROUND function rounds a number to a specified number of digits.
For example, if cell A1 contains 23.7825, and you want to round that value to two
decimal places, you can use the following formula: =ROUND(A1, 2). The result of this
function is 23.78.
Syntax: ROUND(number, num_digits)
where both arguments are compulsory. number is the value to be rounded and num_digits
is the number of digits to which you want to round the number argument.
For example
=ROUND(2.15,1), (Rounds 2.15 to one decimal place to give 2.2)
=ROUND(2.149,1), (Rounds 2.149 to one decimal place to 2.1)
=ROUND(-1.475,2), (Rounds -1.475 to two decimal places to -1.48)
=ROUND(21.5,-1), (Rounds 21.5 to 1 decimal place to the left of the decimal point to 20)
=ROUND(8.92, 0), (Rounds 8.92 to the nearest whole number, resulting in 9)

13. Function Name: FLOOR


Description: Rounds number down, towards zero, to the nearest multiple of
significance.
Syntax: FLOOR(number, significance)
where both arguments are compulsory. number is the value to be floored and significance is
the multiple to which you want to round.
For example
=FLOOR(3.7,2), (Rounds 3.7 down to the nearest multiple of 2 to give 2)
=FLOOR(-2.5,-2), (Rounds -2.5 down to the nearest multiple of -2 to give -2 in opposite
direction)
=FLOOR(5,2), (Rounds 5 down to the nearest multiple of 2 to give 4)
=FLOOR(7.8, 1), (Rounds 7.8 down to the nearest whole number, resulting in 7)
=FLOOR(A1, 10), (Rounds the value in cell A1 down to the nearest multiple of 10)
=FLOOR(12.5 + 7.3, 5), (Rounds the sum of 12.5 and 7.3 down to the nearest multiple of 5,
i.e. 15)
14. Function Name: CEILING
Description: Returns number rounded up, away from zero, to the nearest multiple of
significance.
Syntax: CEILING(number, significance)
where both arguments are compulsory. number is the value to be floored and
significance is the multiple to which you want to round.
For example
=CEILING(3.7,2), (Rounds 3.7 up to the nearest multiple of 2 to give 4)
=CEILING(-2.5,-2), (Rounds -2.5 up to the nearest multiple of -2 to give -4 in opposite
direction)
=CEILING(5,2), (Rounds 5 up to the nearest multiple of 2 to give 6)
=CEILING(7.8, 1), (Rounds 7.8 up to the nearest whole number, resulting in 8)
=CEILING(A1, 10), (Rounds the value in cell A1 up to the nearest multiple of 10)
=CEILING(12.5 + 7.3, 5), (Rounds the sum of 12.5 and 7.3 up to the nearest multiple of 5,
i.e. 20)

15. Function Name: MOD


Description: Returns the remainder after the number is divided by divisor. The result has
the same sign as the divisor. If divisor is 0, MOD returns the #DIV/0! error value. The MOD
function can be expressed in terms of the INT function: MOD(n, d) = n - d*INT(n/d).
Syntax: MOD(number, divisor)
where both arguments are compulsory. number for which you want to find the remainder
and divisor is the number by which you want to divide.
For example
=MOD(3, 2), (Returns remainder as 1)
=MOD(-3, 2), (Returns remainder as 1. The sign is the same as divisor = 1)
=MOD(3, -2), (Returns remainder as -1. The sign is the same as divisor = -1)
=MOD(0, 7), (Returns the remainder as 0, when 0 is divided by 7)
=MOD(12.5, 3), (Returns the remainder as 0.5, when 12.5 is divided by 3)

16. Function Name: RAND


Description: RAND returns an evenly distributed random real number greater than or equal
to 0 and less than 1. A new random real number is returned every time the worksheet is
calculated. To generate a random real number between a and b, use: =RAND()*(b-a)+a. For
example =RAND() returns a random number greater than or equal to 0 and less than 1
=RAND()*100 returns a random number greater than or equal to 0 and less than 100.
Syntax: RAND(). The RAND function syntax has no arguments.

For example
=RAND(), (Generates a random decimal number between 0 and 1, i.e. 0.246417)
=RAND()*100, (Generates a random number between 0 and 100, i.e. 87.15398)
=RAND()*10+10, (Generates a random number between 10 and 20, i.e. 18.49402)
=IF(RAND() < 0.5, "Heads", "Tails"), (Returns “Heads” if random number is less than 0.5, else
returns “Tails”)
=INT(RAND() * 10) + 1, (Generates a random integer between 1 and 10, i.e. 6)
17. Function Name: UPPER
Description: Converts text to uppercase. For example =UPPER(“department”) returns
DEPARTMENT.
Syntax: UPPER(text)
where text is a compulsory argument which text you want converted to uppercase. Text can
be a reference or text string.
For example
=UPPER("hello"), (Returns "HELLO")
=UPPER(A1), (Converts the content in cell A1 to uppercase)
=UPPER("this is an example sentence."), (Returns “THIS IS AN EXAMPLE SENTENCE”)
=UPPER("aBc123$%^"), (Returns "ABC123$%^", change in alphabet lower to upper)
=UPPER(""), (Returns an empty cell since there's no text to convert)

18. Function Name: LOWER


Description: Converts text to lowercase. For example =LOWER(“DEPARTMENT”) returns
department.
Syntax: LOWER(text)
where text is a compulsory argument which text you want converted to lowercase. Text can
be a reference or text string.
For example
=LOWER("HELLO"), (Returns "hello")
=LOWER(A1), (Converts the content in cell A1 to lowercase)
=LOWER("THIS IS AN EXAMPLE SENTENCE."), (Returns “this is an example sentence”)
=LOWER("ABc123$%^"), (Returns "abc123$%^", change in alphabet upper to lower)
=LOWER(""), (Returns an empty cell since there's no text to convert)

19. Function Name: TRUNC


Description: Truncates a number to an integer by removing the fractional part of the
number. TRUNC and INT are similar in that both return integers. TRUNC removes the
fractional part of the number. INT rounds numbers down to the nearest integer based on
the value of the fractional part of the number. INT and TRUNC are different only when using
negative numbers: TRUNC(-4.3) returns -4, but INT(-4.3) returns -5 because -5 is the lower
number.
Syntax: TRUNC(number, [num_digits])
where number is a compulsory argument which is to be truncated. [num_digits] is an
optional argument specifying the precision of the truncation. The default value for
num_digits is 0 (zero).
For example
=TRUNC(12.345), (Truncates 12.345 to a whole number, resulting in 12)
=TRUNC(7.893, 1), (Truncates 7.893 to 1 decimal place, resulting in 7.8)
=TRUNC(-15.678), (Truncates -15.678 to a whole number, resulting in -15)
=TRUNC(9.999, 0), (Truncates 9.999 to a whole number, resulting in 9)
=TRUNC(123456.789, -2), (Truncates 123456.789 to the nearest hundred, resulting in
123400)
20. Function Name: AND
Description: Use the AND function, one of the logical functions, to determine if all
conditions in a test are TRUE. For example =AND(A2>1,A2<100) returns TRUE if A2 is greater
than 1 AND less than 100, otherwise it displays FALSE.
=AND(TRUE,TRUE) returns TRUE
=AND(TRUE,FALSE) returns FALSE
=AND(FALSE,TRUE) returns FALSE
=AND(FALSE,FALSE) returns FALSE
Syntax: AND(Cond1, *Cond2+, …)
where Cond1 is a compulsory argument and [Cond2] onwards are optional arguments (up to
255).
For example
=AND(TRUE, FALSE), (Returns FALSE because not all conditions are true)
=AND(TRUE, TRUE, TRUE), (Returns TRUE because all conditions are true)
=AND(5 > 3, 8 < 10), (Returns TRUE because both conditions are true)
=AND(A1 = "", B1 = ""), (Returns TRUE if both cells A1 and B1 are empty)
=IF(AND(A1 > 10, A1 < 20), "Between 10 and 20", "Not between 10 and 20"), (Returns a
message based on whether the value in A1 is between 10 and 20)

21. Function Name: OR


Description: Use the OR function, one of the logical functions, to determine if atleast one
condition in a test is TRUE. For example =OR(A2<1,A2>100) returns TRUE if either A2 is less
than 1 OR greater than 100, otherwise it displays FALSE.
=OR(TRUE,TRUE) returns TRUE
=OR(TRUE,FALSE) returns TRUE
=OR(FALSE,TRUE) returns TRUE
=OR(FALSE,FALSE) returns FALSE
Syntax: OR(Cond1, *Cond2+, …)
where Cond1 is a compulsory argument and [Cond2] onwards are optional arguments (up to
255).
For example
=OR(TRUE, FALSE), (Returns TRUE because at least one condition is true)
=OR(FALSE, FALSE, TRUE), (Returns TRUE because one condition is true)
=OR(3 > 5, 8 < 5), (Returns FALSE because at both conditions are false)
=OR(0, "Hello"), (Returns TRUE because at least one value is considered as TRUE)
=OR(A1 = "", B1 = ""), (Returns TRUE if at least one of the cells A1 or B1 is empty)

22. Function Name: NOT


Description: Use the NOT function, one of the logical functions, to negate the logical
expression. For example =NOT(A2>100) returns TRUE if A2 is not greater than 100.
=NOT(TRUE) returns FALSE
=NOT(FALSE) returns TRUE
Syntax: NOT(Cond1)
where Cond1 is a compulsory argument and its logical value is negated.
For example
=NOT(TRUE), (Returns FALSE because NOT of TRUE is FALSE)
=NOT(FALSE), (Returns TRUE because NOT of FALSE is TRUE)
=NOT(A1 = "No"), (Returns TRUE because NOT of "Yes" = "No" is TRUE)
=NOT(5 > 3), (Returns FALSE because (5 > 3) yields TRUE and it’s NOT is FALSE)

23. Function Name: IF


Description: The IF function is one of the most popular functions in Spreadsheet, and it
allows you to make logical comparisons between a value and what you expect. So an IF
statement can have two results. The first result is if your comparison is True, the second if
your comparison is False.
Syntax: =IF(logical_test, value_if_true, value_if_false)
logical_test: The condition or logical expression that you want to test.
value_if_true: The value to return if the logical_test evaluates to true.
value_if_false: The value to return if the logical_test evaluates to false.
For example
=IF(A1 > 10, "Greater than 10", "Not greater than 10"), (Returns "Greater than 10" if the
value in A1 is greater than 10, otherwise "Not greater than 10")
=IF(A1 = "Yes", "Approved", "Rejected"), (Returns "Approved" if A1 is "Yes", otherwise
"Rejected")
=IF(A1 >= 60, "Pass", "Fail"), (Returns "Pass" if the score in A1 is 60 or greater, otherwise
"Fail")

24. Function Name: COUNTIF


Description: The COUNTIF function counts the number of cells in a range that meet a
specified condition. It's particularly useful for counting occurrences that match a specific
criterion.
Syntax: =COUNTIF(range, criteria)
range: The range of cells that you want to evaluate.
criteria: The condition or criteria that you want to apply to the cells.
For example
=COUNTIF(A1:A10, ">5"), (Counts how many values in range A1:A10 are greater than 5)
=COUNTIF(B1:B20, "Apple"), (Counts how many times "Apple" appears in range B1:B20)
=COUNTIF(B1:B20, C1), (Counts how many times the value in C1 appears in range B1:B20)
=COUNTIF(E1:E12, "<=100"), (Counts how many values in range E1:E12 are less than or
equal to 100)
=COUNTIF(H1:H8, TRUE), (Counts how many TRUE values appear in range H1:H8)

25. Function Name: SUMIF


Description: The SUMIF function calculates the sum of values in a range that meet a
specified condition. It's particularly useful for adding up values that satisfy a specific
criterion.
Syntax: =SUMIF(range, criteria, [sum_range])
range: The range of cells that you want to evaluate.
criteria: The condition or criteria that you want to apply to the cells.
sum_range: (Optional) The range of cells containing the values to be summed. If omitted,
the values in the range will be summed.
For example
=SUMIF(A1:A10, ">5"), (Sums all values in range A1:A10 that are greater than 5)
=SUMIF(G1:G12, "<=100"), (Sums all values in range G1:G12 that are less than or equal to
100)
=SUMIF(B1:B20, "Apple", C1:C20), (Sums the corresponding values in range C1:C20 where
"Apple" appears in range B1:B20)

Some “Case Based” Practice Questions

In the above image, we have data from cells B2 to D7 (with some empty cells in between).
Evaluate the following functions on the basis of data given in the above image.

=SUM(B2:C7)
=SUM(B2:B7, $C$3)
=PRODUCT(B2:B5)
=PRODUCT(C2:C7)
=MAX(B2:C7)
=MAX(D2:D7)
=MIN(B2:C7)
=AVERAGE(B2:B7)
=AVERAGEIF(B2:B7, “>10”)
=COUNT(B2:D7)
=COUNTA(B2:D7)
=FACT(B4)
=POWER(C3,C5)
=SQRT(B6)
=ABS(C3)
=ROUND(C6,2)
=FLOOR(C6,3)
=CEILING(C6,5)
=MOD(B6,C7)
=UPPER(D6)
=LOWER(D7)
=TRUNC(C6,2)
=AND(B3,D3)
=OR(B3,C3,D3)
=NOT(D3)
=IF(B6>10, “Greater than 10” , ”Not greater than 10”)
=IF(B7>=40, “Pass”, “Fail”)
=COUNTIF(B2:B7,”>10”)
=COUNTIF(D2:D7, TRUE)
=COUNTIF(B2:D7,1)
=SUMIF(B2:D7,”<10”)

You might also like