IF Function in Excel
IF function is one which are used the most often in Excel. IF is a logical function. But you can not only check TRUE / FALSE values.
Let’s take a look at some IF function examples. IF Function contains from 3 parts:
- Logical test – IF function checks if this test is true or false in the cell
- Value if true – IF function puts this value if logical test is true
- Value if false – IF function puts this value if logical test is false
Here you have some examples:
IF exam is passed?
The simplest example is to make a table with exam results. In this table Excel will show, if the Student passed the exam.
Thanks to IF function you can automatically check, if the student passed the exam. The formula is:
=IF($C3>50,”PASSED”,”FAILED”)
IF formula checks the logical test, which is if the student got more points than 50. If logical test is true, Excel writes PASSED. If student got less then 50 points Excel writes FAILED.
Isn’t it simple?
IF exam is passed? More difficult example
Let’s do something more difficult. You want to check if the student passed the exam and you want to get the mark.
A is more than 90 points. B is more than 75 points. C is more than 60 points. D is more than 50 points. It is not hard to do. You must to do more logical tests in Excel’s formula. You check if it is more than 90 points. If it is more, mark is A. If it is not, check if more than 75 points… If all logical tests aren’t true, the mark is E. Formula is:
=IF($C3>90,”A”,IF($C3>75,”B”,IF($C3>60,”C”,IF($C3>50,”D”,”E”))))
If formula seems to be complicated, but it is easy to get it. And the effect is magnificent.
Simple IF Formula
This sample is about acknowledging the information that would help the comprehension of a simple IF formula. In this case, we want to know the amount we make from selling a specific product.
IF and Average
This is an example that simultaneously uses both the average and if formula.
IF and SUM
Usage The issue here is that we would like to know how much the company would make, at a level that addresses the total amount that the company would make, in combination with the quantity of products that we’d have in the inventory.
Double IF in one Formula
The formula here is about using two IF formulas together.
IF, AVERAGE and SUM
in one Formula This example focuses on combining 3 different formulas into 1 to find a result.
IF, MIN and MAX
This example use IF, MIN and MAX formulas to find the answer.
IF and Date
This is the usage of IF and Date formula. This sample focuses on how much we’ve made today, if we only focus on a specific price.
Double IF in one Formula
This example use two IF formula, because we would like to start a new project that would allow us to cleanse our remaining inventory. It was intended that in the event that we have not sold all the products after a specific period of time, we were going to sell it for a specific amount of money. Usage of double IF formula allow productivity to help determine how much we would make from selling it in a specific project.
Net Worth after Expenses
We want to know the profit we would make after paying all expenses, and selling the products at a specific price. This is where we would be using double IF formulas and SUM.
SUM and IF
This is the usage of both functions: sum and if – and find the answer that we are looking for.
Template
Further reading: Basic concepts Getting started with Excel Cell References