0% found this document useful (0 votes)
2 views

Lecture 04 - Functions2

The document provides an overview of functions in MS Excel, including their syntax and commonly used types such as mathematical, logical, text, and date functions. It illustrates how to apply these functions in real-world scenarios, specifically in analyzing student performance based on scores in various subjects. Additionally, it includes examples of formulas for determining pass/fail status, overall performance, and eligibility for honors, along with instructions for ranking students based on average scores.

Uploaded by

alfonsojo002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 04 - Functions2

The document provides an overview of functions in MS Excel, including their syntax and commonly used types such as mathematical, logical, text, and date functions. It illustrates how to apply these functions in real-world scenarios, specifically in analyzing student performance based on scores in various subjects. Additionally, it includes examples of formulas for determining pass/fail status, overall performance, and eligibility for honors, along with instructions for ranking students based on average scores.

Uploaded by

alfonsojo002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Functions in

MS Excel
Learning Objectives:

• Understand the concept of functions in MS Excel.


• Identify and apply commonly used functions.
• Utilize functions in real-world scenarios to
enhance data processing and analysis.
Introduction to
Functions
Introduction to Functions

• Functions in MS Excel are predefined


formulas that perform calculations using
specific values called arguments.
• Functions save time, reduce errors, and
improve efficiency when working with data.
Basic Syntax of a Function

• A function in Excel follows this syntax:


=FUNCTION_NAME(argument1, argument2, …)

Example:
=SUM(A1:A10)
This adds up all values in the range A1 to A10.
Commonly
Used Excel
Functions
Mathematical Functions
Mathematical Functions
• SUM(range) – Adds all numbers in a range.
• =SUM(A1:A5)

• AVERAGE(range) – Calculates the average of numbers.


• =AVERAGE(B1:B10)

• COUNT(range) – Counts the number of numeric values in a range.


• =COUNT(E2:E11)

• MIN(range) – Finds the smallest value in a range.


• =MIN(E2:E11)

• MAX(range) – Finds the largest value in a range.


• =MAX(E2:E11)
Logical Functions
• IF(condition, value_if_true, value_if_false) – Returns a value based on a
condition.
• =IF(A1>50, “Pass”, “Fail”)

• AND(condition1, condition2, …)– Returns TRUE if all conditions are met.


• =AND(A1>50, B1>50)

• OR(condition1, condtion2, …)– Returns TRUE if at least one condition is


met..
• =OR(A1>50, B1>50)
Text Functions
• LEFT(text, num_chars)– Extracts characters from the Left.
• =LEFT(“Excel”, 2) – “Ex”

• RIGHT(text, num_chars)– Extracts characters from the Right.


• =RIGHT(“Excel”, 3) – “cel”

• LEN(text) – Counts the number of Characters.


• =LEN(“Excel”) - 5
Date Functions
• TODAY()– Returns the current date.
• =TODAY()

• NOW() – Returns the current date and time.


• =NOW()

• YEAR(date) – Extracts the year from a date.


• =YEAR(TODAY())
Scenario

A teacher wants to analyze students' performance based


on their scores in Math, Science, and English.

•A student passes a subject if the score is 50 or above.

•A student fails a subject if the score is below 50.

•A student passes overall if they pass all three subjects.

•A student qualifies for honors if their average score is 85


or above.
Student Student ID Name Math Science English
Performance S001 Anna 78 85 90
Evaluation S002 Brian 45 60 52
S003 Carla 88 92 94
S004 Daniel 40 55 50
A teacher wants to analyze students' S005 Emma 90 78 88
performance based on their scores in Math, S006 Fred 60 49 45
Science, and English.
S007 Grace 95 97 98
S008 Harry 30 65 72
S009 Ivy 85 90 80
S010 Jack 48 52 47
Identify Pass/Fail
for Each Subject Student ID Name Math Science English
(Math)
REMARKS
(Science) (English) Overall
Eligible for
Honors
S001 Anna 78 85 90 Pass Pass Pass Pass No
S002 Brian 45 60 52
S003 Carla 88 92 94
S004 Daniel 40 55 50
S005 Emma 90 78 88
Use the IF function to determine if a student passed or failed each
S006 Fred 60 49 45
subject: S007 Grace 95 97 98
S008 Harry 30 65 72
• =IF(C3>=50, "Pass", "Fail") S009 Ivy 85 90 80
S010 Jack 48 52 47
Apply this formula in Column F (Pass/Fail Math), then drag down.

Repeat for Column G (Pass/Fail Science) and Column H (Pass/Fail


English).
Determine Overall
Pass/Fail Status Student ID Name Math Science English
(Math)
REMARKS
(Science) (English) Overall
Eligible for
Honors
S001 Anna 78 85 90 Pass Pass Pass Pass No
S002 Brian 45 60 52
S003 Carla 88 92 94
S004 Daniel 40 55 50
S005 Emma 90 78 88
A student passes overall if they pass all three subjects. S006 Fred 60 49 45
S007 Grace 95 97 98
Use the AND function inside an IF function: S008 Harry 30 65 72
S009 Ivy 85 90 80
S010 Jack 48 52 47
• =IF(AND(C2>=50, D2>=50, E2>=50), "Pass", "Fail")

Apply this formula in Column I (Overall Pass/Fail).


Identify Students
Eligible for Honors Student ID Name Math Science English
(Math)
REMARKS
(Science) (English) Overall
Eligible for
Honors
S001 Anna 78 85 90 Pass Pass Pass Pass No
S002 Brian 45 60 52
S003 Carla 88 92 94
S004 Daniel 40 55 50
S005 Emma 90 78 88
A student qualifies for honors if their average score is at S006 Fred 60 49 45
least 85: S007 Grace 95 97 98
S008 Harry 30 65 72
S009 Ivy 85 90 80
• =IF(AVERAGE(C2:E2)>=85, "Yes", "No") S010 Jack 48 52 47

•Apply this formula in Column J (Eligible for Honors?).


Student ID Name Math Science English
Use MAX and MIN functions:
S001 Anna 78 85 90
(Highest score in row) S002 Brian 45 60 52
S003 Carla 88 92 94
=MAX(C2:E2) S004 Daniel 40 55 50
S005 Emma 90 78 88
(Lowest score in row) S006 Fred 60 49 45
S007 Grace 95 97 98
=MIN(C2:E2) S008 Harry 30 65 72
S009 Ivy 85 90 80
S010 Jack 48 52 47

Highest Score 95 97 98
Lowest Score 30 49 45

Highest and Lowest Score


Rank Based on Student ID Name Math Science English Average Rank
Average Score S001 Anna 78 85 90 84 5
S002 Brian 45 60 52 52 7
S003 Carla 88 92 94 91 2
S004 Daniel 40 55 50 48 10
Calculate Rank Based on Average Score S005 Emma 90 78 88 85 3
S006 Fred 60 49 45 51 8
Use the RANK function: S007 Grace 95 97 98 97 1
S008 Harry 30 65 72 56 6
• =RANK(K3, $K$3:$K$12, 0) S009 Ivy 85 90 80 85 4
S010 Jack 48 52 47 49 9
FINAL OUTPUT
REMARKS Eligible for
Student ID Name Math Science English Average Rank
(Math) (Science) (English) Overall Honors
S001 Anna 78 85 90 Pass Pass Pass Pass No 84 6
S002 Brian 45 60 52 Fail Pass Pass Pass No 52 4
S003 Carla 88 92 94 Pass Pass Pass Pass Yes 91 9
S004 Daniel 40 55 50 Fail Pass Pass Pass No 48 1
S005 Emma 90 78 88 Pass Pass Pass Pass Yes 85 8
S006 Fred 60 49 45 Pass Fail Fail Fail No 51 3
S007 Grace 95 97 98 Pass Pass Pass Pass Yes 97 10
S008 Harry 30 65 72 Fail Pass Pass Pass No 56 5
S009 Ivy 85 90 80 Pass Pass Pass Pass Yes 85 7
S010 Jack 48 52 47 Fail Pass Fail Fail No 49 2

Highest Score 95 97 98
Lowest Score 30 49 45
Seatwork:

• What happens if we replace AND with OR in the Overall Pass/Fail


formula?
• Can a student with one failed subject still qualify for honors? Why or
why not?
• How can we extend this analysis to include more subjects?
Thank you

You might also like