Chapter 4
Chapter 4
Excel has over 300 functions grouped by type. There are more than 60
mathematical and trigonometric functions listed.
1. Mathematical functions:
Some of these functions are quite easy to understand - the PI function returns the
value of the constant when dealing with geometry circles (3.14). Some are obvious
from context.
SIN() and COS() are basic trigonometric functions.
3. List of mathematical functions
Among the mathematical functions we have chosen the most common ones.
3.1 ABS Function.
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 1
Chapter 4 Mathematical functions
The MOD function in Excel is used to find remainder after division of one number
(dividend) by another (divisor). In mathematics, this operation is called
the modulo operation or modulus, hence the name MOD.
Syntax
The MOD function has the following syntax: MOD (number, divisor)
Number Required. The number for which you want to find the remainder (the
number to be divided).
Divisor Required. The number by which you want to divide number (the
number to divide by).
For example MOD (10,3) returns 1 because 10 divided by 3 has a quotient of 3 and
leaves a remainder of 1 (10=3*3+1). The formula MOD (10,5) returns zero because
10 is divided by 5 without remainder.
Remarks :
1. The MOD function returns a numeric value.
2. The result of the MOD function has the same sign as the divisor.
3. If the divisor is 0, MOD returns the #DIV/0! error because you cannot divide by zero.
4. If the number or divisor is a text value, an Excel Mod formula returns the #VALUE! error.
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 2
Chapter 4 Mathematical functions
Based on the Excel spreadsheet above, the following MOD examples would return:
The POWER function in Microsoft Excel computes a given numerical value raise to a
supplied exponent or power and The POWER function returns a numeric value.
Syntax
The syntax of the POWER function is:
POWER (number, power)
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 3
Chapter 4 Mathematical functions
In this formula, the power and number arguments are number values. These
arguments can be entered in the formula either as a cell reference which contain the
numeric value or as a value returned from other formulas or functions.
But you have to take note that the POWER function in Microsoft Excel is similar to
the power operator (^). For example, POWER (6, 2) is similar to 6^2.
Remark:
However, if you have an error from the POWER function, the function will return the
result which is #VALUE!. This result is displayed if Microsoft Excel is not able to
interpret either of the number or power arguments as numeric values.
Example : (as Worksheet Function)
Let's look at some Excel POWER function examples and explore how to use the
POWER function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following POWER examples would
return:
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.
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 4
Chapter 4 Mathematical functions
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
The syntax for the PRODUCT function in Microsoft Excel is:
PRODUCT ( number1, number2, …..number_n )
The PRODUCT function syntax has the following arguments:
number1 Required. The first number or range that you want to multiply.
number2, ... Optional. Additional numbers or ranges that you want to
multiply, up to a maximum of 255 arguments.
Remarks:
The PRODUCT function returns a numeric value.
If an argument is an array or reference, only numbers in the array or
reference are multiplied. Empty cells, logical values, and text in the array
or reference are ignored.
Example1 : (as Worksheet Function)
Let's look at some Excel PRODUCT function examples and explore how to use the
PRODUCT function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following PRODUCT examples would return:
The Microsoft Excel SQRT function returns the square root of a number.
Syntax : The syntax for the SQRT function in Microsoft Excel is:
SQRT( number )
Number : A positive number that you wish to return the square root for.
Remarks:
- The SQRT function returns a numeric value.
- If a negative number is entered in the number parameter, the SQRT function
will return the #NUM! error.
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 5
Chapter 4 Mathematical functions
Based on the Excel spreadsheet above, the following SQRT examples would return:
=SQRT(A1) Result: 5
=SQRT(A2) Result: 5.796550698
=SQRT(A3) Result: #NUM!
=SQRT(82.6) Result: 9.088454214
You can use a simple formula to sum numbers in a range (a group of cells), but the SUM
function is easier to use when you’re working with more than a few numbers. For
example =SUM(A2:A6) is less likely to have typing errors than =A2+A3+A4+A5+A6.
The SUM function adds values. You can add individual values, cell references or ranges
or a mix of all three.
Here’s a formula that uses two cell ranges: =SUM(A2:A4,C2:C3) sums the numbers
in ranges A2:A4 and C2:C3. You’d press Enter to get the total of 39787.
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 6
Chapter 4 Mathematical functions
When you click AutoSum, Excel automatically enters a formula (that uses the SUM
function) to sum the numbers.
Based on the Excel spreadsheet above, the following SUM examples would return:
Description
You use the SUMIF function to sum the values in a range that meet criteria that
you specify.
For example, suppose that in a column that contains numbers, you want to sum
only the values that are larger than 5. You can use the following formula:
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 7
Chapter 4 Mathematical functions
=SUMIF(B2:B25,">5")
In this example, the criteria is applied the same values that are being summed. If
you want, you can apply the criteria to one range and sum the corresponding
values in a different range.
For example, the formula C9 =SUMIF(B2:B8; B3;C2:C8) sums only the values in
the range C2:C8, where the corresponding cells in the range B2:B8 equal "omar."
(B3=”Omar”)
Syntax
=SUMIF(range,criteria,sum_range)
3. sum_range : Optional. Actual cells to add, if you want to add cells other
than those specified in the range argument. If the sum_range argument is
omitted, Excel adds the cells specified in the range argument (the cells to
which the criterion applies).
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 8
Chapter 4 Mathematical functions
To go further, I strongly encourage you to look at the SUM.IF.ENS function which makes it
easier to share by multiplying the SUM.IF function over several ranges and several criteria.
4. Specify the range for the conditionB2:B10 (the Type 1 values) 5.Type ,
6.Specify the criteria (the cell E3, which has the value "Grass") 7.Type ,
8.Specify the range for the sum C2:C10 (the Total values) 9.Hit enter
The function now sums the Total stats for Grass type.
The function can be repeated for the other types to compare them:
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 9
Chapter 4 Mathematical functions
Now, we can see the sum of total stats for the different types:
Bibliography
From the achievements: Pr. Baouni Lila & Dr. Kaddour Daouia Page 10