Searching...
Wednesday, June 12, 2013

Using Nested 'IF' function in Excel

If you understand the IF function in Excel then please continue to understand how to use nested IFs. Otherwise please go through the below tutorial.


On most occasions you will feel the need to use multiple IFs. I will take a simple example to award grades to student based on their marks. Lets say that you have the following sheet with below rules of the grading

Marks >= 80 , Grade A
Marks < 80 and Marks >60, Grade B
Marks <=60 and Marks >=40, Grade C
Marks <40, Grade D



Now to award Grade A, its simple to use the following formula on C2 for first row

=IF(B2>=80,"Grade A"," ")

Now  if we extend the formula to all the required rows, we will have a result as below


As you can see, we were only able to award A grades. Now lets extend the above for Grade B.  If the criteria for Grade A is not satisfied, the control will go to false part of formula which means we will have to amend that part. So the amended formula on C2 is now 

=IF(B2>=80,"Grade A",IF(B2>60,"Grade B",""))


As you can see in the snapshot above, we were able to award B grades also. On the similar lines we can extend the formula to award all grades.

=IF(B2>=80,"Grade A",IF(B2>60,"Grade B",IF(B2>=40,"Grade C","Grade D")))

to get the below result.


1 comments:

  1. The casino opens in New Jersey with slot machines
    “Our slot machines will 광명 출장안마 be available to 시흥 출장마사지 all residents of 세종특별자치 출장안마 New Jersey for a $25 minimum deposit of 남양주 출장안마 $10 and 평택 출장마사지 $25 progressive jackpots for every $25

    ReplyDelete

 
Back to top!