Spreadsheets
Spreadsheets
∙ 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 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)
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)
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)
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”)