Logical Functions IF | Multiple If Statements Excel

Contact Us

Bhandup (W): Dreams Mall, Opp BMC Market, Nr Bhandup Station, Mumabi 400078.
Thane (W): G-03, SAI Sagar App, Beside Sai Babab Mandir, Kalher Thane.

+91 9870419968

info@advancedexcelcourse.com






Logical Functions   "IF"


IF Function.

=IF(Condition,IFTrue,IFFalse)
Checks if a condition is met, and returns one value if true, and another value if false

Example 1:

A B C
1 User Input Output Formula Used
2 A Apple =IF(A2="A","Apple",IF(A2="B","Bat",IF(A2="C","CAT")))
3 B Bat =IF(A3="A","Apple",IF(A3="B","Bat",IF(A3="C","CAT")))
4 C CAT =IF(A4="A","Apple",IF(A4="B","Bat",IF(A4="C","CAT")))
5 D False =IF(A5="A","Apple",IF(A5="B","Bat",IF(A5="C","CAT")))
  • According to the Example 1:
    1. If user input is "A" then the output should be "Apple"
    2. If "B" then "BAT"
    3. And if "C" then "CAT"
  • We have not specified any output if the user value is other than "A","B" and "C" hence the out is "False" in the cell B5

Example 2:

A B C
1 Designation Hike Formula Used
2 Manager 15% =IF(A2="Manager",15%,IF(A2="TL",20%,IF(A2="Executive",25%)))
3 TL 20% =IF(A3="Manager",15%,IF(A3="TL",20%,IF(A3="Executive",25%)))
4 Executive 25% =IF(A4="Manager",15%,IF(A4="TL",20%,IF(A4="Executive",25%)))
  • Example II is the same as Example I but if you see the user output “Apple” “Bat” and “Cat” are in Inverted commas. Wherein Example II the output 15%, 20% and 25% is not in Inverted commas.
  • It is always recommended to keep text in Inverted commas and values without Inverted commas.

Example 3:

A B C
1 Designation Salary Formula Used
2 TL 45000 =IF(A2="TL",45000,25000)
3 Executive 25000 =IF(A3="TL",45000,25000)
4 TL 45000 =IF(A4="TL",45000,25000)
5 Executive 25000 =IF(A5="TL",45000,25000)
  • In this example we have mentioned “if not” value as 25000 hence if the condition is not met it returns 25000 instead of “FALSE” as like the first two examples.

Example 4:

A B C D
1 Designation Salary Hike Formula Used
2 TL 45000 9000 =IF(A2="TL",B2*20%,B2*25%)
3 Executive 25000 6250 =IF(A3="TL",B3*20%,B3*25%)
4 TL 45000 9000 =IF(A4="TL",B4*20%,B4*25%)
5 Executive 25000 6250 =IF(A5="TL",B5*20%,B5*25%)
  • This Example is the same as Example 3 above; instead of preset numbers we have used a calculation method.





  • facebook
  • google+
  • Youtube
  • skype
  • whatsapp
  • mobile
  • mail