How to Use IF Function in Microsoft Excel

 

How to Use IF Function in Microsoft Excel

We will discuss in this article “How to Use IF Function in Microsoft Excel”. For the purpose, we will prepare result of students using “IF Function” in Microsoft Excel. However we will define IF Function in MS Excel before using it.

Definition of IF Function in Microsoft Excel

IF Function in Microsoft Excel is function or formula which gives us the result of a logical test in false or true. Suppose we have to give the condition in formula to pass the students getting 50 percent and above marks and fail student who have got less than 50 percent marks. Apply following method to get results of students.

How to Use IF Function in Microsoft Excel

Suppose we have to type list of students appearing in Class 9th and 10th. However, to save time and effort we will copy list of all students through creating new worksheet and rename it as Result. Then we will delete students of classes other than 9th and 9th after applying filter option in Microsoft Excel.

We will activate all classes less 9th and 10th in Filter option. Then select all rows delete them by pressing CTRL + - or right click and then select option delete rows. We will clear filter option after deleting rows. Resultantly, students of 9th and 10th class will appear. Then type subjects of 9th and 10th classes in columns in front of students’ names and give marks to each students.

It is highlighted that we can give results to students after knowing total marks, obtained marks and percentage of achieved marks. Since we must create these three more columns for getting results. Following skeleton of students’ result sheet will be created after creating above columns :-

 

A

B

C

D

E

F

G

H

I

J

K

1

Name

Eng

Bio

Math

Phy

Chem

Total Marks

Total Mks Obt

%age

Result

Grading

2

Total Mks

100

100

100

100

100

500

 

 

 

 

3

Aziz Ullah

40

60

75

78

66

500

319

63.80

Pass

C

4

Inayat Ullah

50

50

50

50

50

500

250

50.00

Pass

D

 

We shall get total marks after apply AutoSum  in “ Total Marks Obtained”.  We shall calculate percentage after dividing total marks obtained with Total marks column %.  However, to get result and grading of students we shall use IF Function” as under:-

How to Use IF FUNCTION in Microsoft Excel

Place cursor in result column of first student (3J) and type formula as =If(3J>=50,”Pass”,”Fail)

Definition of formula

=If is a function of Microsoft Excel. (3J is the syntax or range for which we have to know if it is pass or fail. >=50, is argument which has been set to give condition to IF Function. “Pass”,”Fail”) is logical value we have given command if students have equal or greater than 50 percent marks, then student be declared as pass otherwise fail. We shall copy and paste or use auto fill function to apply for remaining students.  

How to Use IF Function in MS Excel for getting Grading of Students.

Suppose students achieving 50 percent and above marks are D grade, 60 percent and above are C grade, 70 percent and above are B grade, whereas 80 percent and above or A grade whereas students achieving lower than 50 percent are fail. To set these conditions, we shall type following formula:-

=IF(K3>=80,"A",IF(K3>=70,"B",IF(K3>=60,"C",IF(K3>=50,"D",IF(K3>=5,"F"))))).


Post a Comment

0 Comments