If Formula In Excel Part 8

This topic has been explained in great detail in the video shown below, to learn this topic just play the video and the notes are mentioned below the video.

If Formula In Excel Part 8

IF Formula in Excel

The Video above explains how to use the IF Formula of MS Excel. The Text below is from a Microsoft Excel Support Blog

The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect. In its simplest form, the IF function says:

  • IF(Something is True, then do something, otherwise do something else)

So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False.

If you want to skip ahead to working with multiple IF statements, see: Advanced IF functions – Working with nested formulas and avoiding pitfalls.

Technical details

Simple IF examples

Cell D2 contains a formula =IF(C2="Yes",1,2)

  • =IF(C2=”Yes”,1,2)

In the above example, cell D2 says: IF(C2 = Yes, then return a 1, otherwise return a 2)

Cell D2 contains the formula =IF(C2=1,"YES","NO")

  • =IF(C2=1,”Yes”,”No”)

In this example, the formula in cell D2 says: IF(C2 = 1, then return Yes, otherwise return No)

As you see, the IF function can be used to evaluate both text and values. It can also be used to evaluate errors. You are not limited to only checking if one thing is equal to another and returning a single result, you can also use mathematical operators and perform additional calculations depending on your criteria. You can also nest multiple IF functions together in order to perform multiple comparisons.

NOTE: If you are going to use text in formulas, you need to wrap the text in quotes (e.g. “Text”). The only exception to that is using TRUE or FALSE, which Excel automatically understands.

How to get started

The best way to start writing an IF statement is to think about what you are trying to accomplish. What comparison are you trying to make? Many times, writing an IF statement can be as simple as thinking through the logic in your head: “what should happen if this condition is met vs. what should happen if it’s not?” You will always want to make sure that your steps follow a logical progression, or else your formula won’t do what you think it should. This is especially important when you create complex (nested) IF statements.

More IF examples

Formula in cell D2 is =IF(C2>B2,”Over Budget”,”Within Budget”)

  • =IF(C2>B2,”Over Budget”,”Within Budget”)

In the above example, the IF function in D2 is saying IF(C2 Is Greater Than B2, then return “Over Budget”, otherwise return “Within Budget”)

Formula in cell E2 is =IF(C2>B2,C2-B2,"")

  • =IF(C2>B2,C2-B2,0)

In the above illustration, instead of returning a text result, we are going to return a mathematical calculation. So the formula in E2 is saying IF(Actual is Greater than Budgeted, then Subtract the Budgeted amount from the Actual amount, otherwise return nothing).

Formula in Cell F7 is IF(E7=”Yes”,F5*0.0825,0)

  • =IF(E7=”Yes”,F5*0.0825,0)

In this example, the formula in F7 is saying IF(E7 = “Yes”, then calculate the Total Amount in F5 * 8.25%, otherwise no Sales Tax is due so return 0)

Best Practices – ConstantsIn the last example, you see both “Yes”, and the Sales Tax Rate (0.0825) entered directly into the formula. It is generally not a good practice to put literal constants (values that may need to change from time to time) directly into formulas, because they can be hard to find and change in the future. It’s much better to put constants into their own cells, where they are out in the open and easily found and changed. In this case, it’s OK, because there’s only one IF function and the Sales Tax Rate will rarely change. Even if it does, it will be easy to change it in the formula.

Our Other Services

Read Free Ebooks


Myebook has 1000's of free ebooks for you. On productivity, health, online income, learning, music and many more, it's free of course!

Buy Excel Course


Become an Excel Guru, Buy the best Excel course. Learn on your mobile, tv & laptop without internet. For COD, Call 9752003788

Create Best Looking Resume


At Makecv.org you get to create a amazingly professional looking resume in just 3 steps with our intuitive resume builder!

Download Excel Crash Course

This Excel Crash Course contains the list of topics that cover the most important and used features and formula of Excel . This Excel Crash Course lists 43 major topics in Excel so that you can start using Excel like a pro in the shortest possible time.

Learn Photoshop Web Designing

You can Buy the Photoshop Course to learn Photoshop and start a career in Web Designing and Photo Editing. .


You can Buy the HTML CSS Course to learn HTML CSS and start a career in Web Designing and Photo Editing. .

Download Full list of Excel Shortcuts

This Excel Shortcuts Complete list is to help you become save time and use Excel like a Master level user. Excel is best used when you know the Keyboard shortcuts because the use of keyboard shortcuts in Excel helps you in completing tasks faster.

I have created a Excel Shortcuts complete list for you to use Excel better, this list has 242 excel keyboard shortcuts which means that it covers almost everything that can be done using shortcuts in Excel.

Full List of Excel Formulas

This is a complete alphabetical list of all the Formula in Excel with a description. You can learn all these formulas on www.Myelesson.org

Convert Numbers to Text in Excel

Now easily convert numbers to Text in Excel with this inbuilt sheet from myelesson.org .  Many times we need the amount in figures to be converted into words. This is a typical requirement for writing checks or any other financial reports. Microsoft Excel does not have standard function available for this requirement. Just download this sheet and then you can convert any number to text in Excel.

List of Most Commonly Asked Excel Questions in Interviews

Here is the list of most asked excel related questions in interviews.  Prepare for this excel questions and you would be able to most of the excel interviews. This list of excel questions covers excel formula, excel analysis, excel reporting, excel charts and more.

Myelesson © 2010 - 2014. All rights reserved.

Do You Want to Become a Expert in Excel ?
Buy The Full Excel Course Now
Enter Your Details & We Will Contact You
Great Choice
Thank You