Lesson 5 Advance Functions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Lesson 5 Advance Functions Week 3 - 4

As cited from Tan and Bongalos (2013), a function is a preprogrammed formula designed to perform
specific calculations. Functions work like simple computer programs wherein you supply the data, and the
function performs a calculation and gives you a particular result. They eliminate laborious manual entry of
formulas while giving them human-friendly names.

The basic functions of Excel include math, count, and some statistical functions. The math functions
carry out basic math operations, such as adding, multiplying, and dividing ambers. Other basic functions
may be used to analyze data in different ways. You can also perform basic statistical operations, such as
getting the average values, or getting the highest and lowest value in your data. Tan and Bongalos (2013)
provided the following basic Excel functions.

Function Example
SUM
Syntax: = SUM(Number 1, Number2,…, Number255) =SUM(A1:A10)
=SUM(A1, A2, A3)
The SUM function adds values of columns or rows of =SUM(B5: B10,C1)
numbers or range of cells A maximum of 255 values may be =SUM(S1,100)
entered into the function.

Number1, Number2,…, Number255 can be numbers, cell


ranges, arrays, or cell references.

PRODUCT
Syntax: PRODUCT(Number 1, Number2,…, Number255) =PRODUCT(A1:B1)
=PRODUCT(C1,D1)
The PRODUCT function multiplies the values of columns or =PRODUCT(A10,2)
rows of numbers or range of cells.

QUOTIENT
Syntax: QUOTIENT(Numerator, Denominator) =QUOTIENT(X100,X99)
=QUOTIENT(Z10,5)
The QUOTIENT function divides numbers However, unlike
regular division, this function returns only a whole number as an
answer. It does not include the remainder in the results.

COUNT
Syntax: =COUNT(Range) =COUNT(A1:A100)
The COUNT function gets the total number of cells in a
selected range that contains numbers. It ignores empty or those =COUNT(B1:B50, C1:C50)
containing text. However, if a number is later added. to an empty
cell, the result will be updated automatically.

COUNTA
Syntax: COUNTA(value1, [value2], ...) =COUNTA(A1:A30)
=COUNTA(B2:D6, B9:D13)
The COUNTA function counts the number of cells that are
not empty in a range. It counts cells containing any type of data,
including error values and empty text ("").

St. Scholastica’s Academy Grade 9 - ICT Page 10


AVERAGE
Syntax =AVERAGE(Number1,Number2,…,Number255) =AVERAGE(D1:D500)
=AVERAGE(F1,F2,F3.F4)
The AVERAGE function is used to find the average or
arithmetic mean of a list of numbers A maximum of 255 values
may be entered into the function.

MAX
Syntax: =MAX(Number1,Number2,…,Number30) =MAX(G10:90)
=MAX(M1:M10,O1:O12)
The MAX function is used to find the largest or maximum
number in a given list of values or arguments. A maximum of 30
values may be entered to the function.

MIN
Syntax: =MIN(Number1,Number2,…,Number30) =MIN(D100,50)
=MIN(E51:E70,G51:G70)
The MIN function is used to find the smallest or minimum
number in a given list of values or arguments. A maximum of 30
values may be entered to the function.

ROUND
Syntax: =ROUND(Number, Number Value) =ROUND(A100,2)
=ROUND(D10,0)
The ROUND function is used to reduce a value by specific =ROUND(S90,-2)
number of decimal places. Note that unlike places displayed, the
rounding function of Excel alter the data in your worksheet. Thus,
using the ROUND function can affect the result of calculation.

Tan & Bongalos (2013) discussed the following in their book Brilliant Computing:

Parts of the Function


Equal Sign Separator

=SUM(A1:A4)

Function Name
Arguments
A colon is used to separate the first cell reference and the last cell reference in the range. When adjacent
cells are the arguments of a function, a range of cells may be referenced by typing the first cell reference
followed by a colon (:) and then the last cell reference. Thus, the formula =SUM (A1:A4) will show the total
values stored in cells Al, A2, A3, and A4.

When non-adjacent cells are used as the arguments of a SUM function, the arguments are separated
with a comma. For example, to add the values stored in cells A1, C3, and D8, the formula is:

St. Scholastica’s Academy Grade 9 - ICT Page 11


Equal Sign Separator

=SUM(A1, C3, D8)

Function Name
Argument
Inserting Function

To insert a function in the Excel, perform the following steps:

1. Click on the Insert Function button to access the Insert Function dialog box.

2. Click on the function you want to use and enter the argument.

Or

You can enter the function directly into the cell.

St. Scholastica’s Academy Grade 9 - ICT Page 12


Note that the best way to enter a cell range into a function is by pointing because errors are
minimized. After the opening parenthesis has been typed, drag from the first cell in the range to the last
as shown in the example above.

3. Press Enter to perform the function.

Note: Same procedure will be followed to perform the other functions.

Logical Functions

Excel uses several logical functions – AND, IF, IFERROR, NOT, and OR. You can use logical functions
in the worksheets if you want them to have decision-making capacities. All logical functions return either
the logical TRUE or logical FALSE when their function are evaluated. Here are the names of the logical
functions along with their syntax:

Logical Function Example


AND
Syntax: =AND(logical1, logical2,…) =AND(A1>=75, A1<=100)
The AND logical function is used to test whether the logical =AND(B15<>; “Student” , C15>=18)
arguments (conditions) are true or false. If all conditions evaluate
St. Scholastica’s Academy Grade 9 - ICT Page 13
the data to be true, the AND function returns TRUE the data to
the cell. If at least one condition evaluates to be false, the AND
function returns FALSE.
OR
Syntax: =OR(logicall,logical2,...) =OR(A1= “M”,B1>=18)
=OR(D10>=D1,E10= “E”)
The OR logical function is used to test whether the logical
arguments are true or false. If at least one condition evaluates the
data to be true, the OR function returns TRUE. The OR function
returns FALSE if all conditions evaluate the data to be false.
NOT
Syntax: =NOT(logical) =NOT(J10=100)

The NOT logical function is used to test whether the logical


argument is true or false. If true, the NOT function returns FALSE
If false, the NOT function returns TRUE.
IF =IF(Z20>=18, “Qualified”, “Not
Syntax: =IF(logical_test, value_if_true, value if false) Qualified”)
=IF(G100=A100, “CORRECT!”,
The IF logical function is used to test whether the logical test “TRY AGAIN!”)
expression is true or false. If true, the IF function returns the
value_ if true argument If false, the IF function returns the
value_if_false argument.
IFERROR
Syntax: =IFERROR (value, value_if_error) =IFERROR(S10/T10, “Invalid”)

The IFERROR logical function is used to test whether the


value expression is an error. IFERROR returns value_if_error if
the expression is an error, or value of the expression if it is not an
error.

The logical_test and logical arguments that you specify for these logical functions use the comparison
operators (=, <,>, <, >, and < >), and return logical TRUE or logical FALSE values. For example, suppose
that you enter the following formula in your worksheet.

=AND(D1>=75, D1<=100)

St. Scholastica’s Academy Grade 9 - ICT Page 14


In this formula, Excel first evaluates the first logical argument to determine whether the contents in cell
D1 is greater than or equal to 75. If it is, the first condition returns TRUE. If it is not greater than or equal to
75, the first condition returns FALSE. The program then evaluates the second logical argument to determine
whether the content of cell Dl is less than or equal to 100. If it is, the second comparison returns TRUE. If
it is not less than or equal to 100, this comparison returns FALSE.

After evaluating both conditions in the two logical arguments, the AND function compares the results:
if logical argument 1 and logical argument 2 are both found to be TRUE, then the AND function returns
logical TRUE in the cell. If, however, either argument is found to be FALSE, the AND function returns
FALSE in the cell.

In the IF function, you specify what is called a logical_test argument whose result determines whether
the value_if_true or value_if_false argument will be returned in the cell. The logical_test argument uses
comparison operators, which evaluate to either the logical TRUE or logical FALSE value. When the
argument evaluates to be true, the entry or expression in the value_if_true argument is returned in the cell.
When the argument evaluates to be false, the entry or expression in the value_if_false argument is returned.

Consider the following formula that uses the IF function to determine whether the customer is qualified
for a discount.

=IF(D3>=1000, D3-D3*E3,D3)

If cell D3 contains a value greater than or equal to 1000, the IF function uses the value_if_true argument
that tells Excel to subtract the 2% in cell E3 from the current cell value of D3. On the other hand, if cell D3
is empty or if it contains a value less than 1000, then the IF function uses the value_if_false argument to tell
Excel to just return the price in cell D3 without subtracting anything from its current value.

COUNTIF Function

The COUNTIF function combines the IF function and COUNT function of Excel Thus, this function
allows you to count the number of cells within a range that satisfies a single criterion that you specify.

COUNTIF Function Example


Syntax: =COUNTIF(range,criteria)
=COUNTIF(A1:145,">=70")
The range argument contains the cell reference/s of one or =COUNTIF(C3:C15,"A")
more cells to include in the count. This covers numbers, names,
St. Scholastica’s Academy Grade 9 - ICT Page 15
arrays, or references that contain numbers. Blank and text
contents are ignored.

The criteria argument must contain a number, expression, cell


reference, or text string that serves as the basis of the cells to be
counted.

In this scenario, the COUNTIF function can be used to find out how many cells got a value of greater
than or equal to 75 to determine how many students passed the test. For example,

=COUNTIF(E1:E6,“>=75”)

SUMIF Function

SUMIF function combines the use of the IF function and the SUM function You can use the SUMIF
function to sum the values in a range that meet a criterion you specify

Syntax: =SUMIF(range,criteria,sum_range)

The range argument must contain the range of cells that you want to be evaluated, using the criteria.
Cells in the range argument may contain numbers or names. Blank and text values will be ignored.

The criteria argument may be in the form of a number, expression, cell reference, text, or function that
serves as the basis of the cells to be added. For example, criteria can be expressed as 100, “>74”, B5,
“STUDENT”, or TODAY()

It is important to note that any text criteria or any criteria that include logical or mathematical symbols
must be enclosed in double quotation marks (“) If the criterion is numeric, double quotation marks are not
required.

The sum_range argument is optional. This refers to the actual cells to be added, 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
that are specified in the range argument (the same cells evaluated by the criteria).

St. Scholastica’s Academy Grade 9 - ICT Page 16


For example, in a column that contains food categories, you want to sum only the values that are fruits.
You can use the following formula:

=SUMIF(D2:D7,"Fruits",F2:F7)

In this example the SUMIF function adds only the values in the range F2:F7, where the corresponding
cells in the range D2:D7 contain the text "Fruits".

VLOOKUP Function

Another very useful Excel function is the VLOOKUP function. It can be used when you need to look
up the values at a specific table and check them against other data fields for comparison. VLOOKUP stands
for Vertical Lookup, it is used to find specific data from the data sheet.

Syntax: =VLOOKUP(lookup_value,table_array.col_index_num,range_lookup)

The lookup_value argument contains the value of the number which you will be looking up. This may
contain a number, text, or cell reference.

The table_array argument defines the table you will be using as reference for the values to be returned.

The col_index_num argument contains the column number in table_array from which the matching
value must be returned. The first column of the table_array is the first column.

The range_lookup argument is optional. It determines if you are looking for an exact match based on
the lookup_value. Enter FALSE to find an exact match. Enter TRUE to find an approximate match, which
means that if an exact match is not found, then the VLOOKUP function will look for the next largest value
that is less than the lookup_value. If this parameter is omitted, the VLOOKUP function returns an
approximate match.

For instance, you have a student record book containing Class Number, Name, and Grade.

St. Scholastica’s Academy Grade 9 - ICT Page 17


Step 1: You need to create two new columns containing numeric grades range (sorted in ascending
order) and their corresponding letter marks. You do not need to create the two columns in a new worksheet,
you can just place them anywhere in the existing worksheet.

Step 2:
• In the first row of the Letter Mark column, you will write the VLOOKUP function. In this case, you
must identify what values must be assigned to your VLOOKUP arguments. For the first argument,
lookup_value, you need to look for the letter mark of grade 96 in the new table. Or you can use its
cell reference, which is C2.
• For the next argument, table_array, you need to identify from which table you are going to get the
values to be returned. In this case, the table_array will be the newly created table containing the range
of possible grades and their equivalent letter marks.
• The third argument, col_index_num should identify the column from which the returned value will
come. In this case, the letter mark is on the second column, counting from the first column specified
in the table_array
• Lastly, the range_lookup must let you choose whether you want an exact match or an approximate
match. For this scenario, since not all possible grade values are included in the table, you will use the
argument TRUE.
• Now, the VLOOKUP function must be written in cell C2, and it should go like this:
=VLOOKUP(C2,$F$3:$G$11,2,TRUE)
St. Scholastica’s Academy Grade 9 - ICT Page 18
RESULT:

Applying it to all of the students will give you the result below.

St. Scholastica’s Academy Grade 9 - ICT Page 19

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy