You are on page 1of 9

IF Excel Formulas, Examples & How to Use the Complete Excel IF

Functions.
IF excel formula function: Tutorial on how to use the complete excel if formula, whether the single,
double, or multi-level if excel formulas in Microsoft Excel.

IF Excel Formula - You want to know about how to use the Excel IF Formula Function? Please study
the following excel IF formula tutorial.

• Understanding the Functions of IF Excel

• How to Use the IF Excel Formula

• Example of the IF Excel Formula

• Single IF formula

• Double IF formula

• Multilevel IF Formula

• Notes on Using Excel IF Formulas

• Advanced IF Formula

Definition of IF Excel Functions


What is the meaning of IF function or IF excel formula?

IF function or IF formula is an Excel function in a logical category or group that is often used to
perform certain logic tests on Microsoft Excel formulas.

Excel IF formula will produce a certain value if the conditions we specify for evaluation are met
(TRUE) and will produce other values if the logical test or condition is not met (FALSE).

In other words, the IF excel function will evaluate certain logical tests and then produce TRUE or
FALSE values. The TRUE value is the value where the condition is met and the FALSE value is the
value for the condition that is not met.

TRUE = Right. Conditions are met. Evaluation of the logical test results correctly.

FALSE = False. Conditions not met. Evaluation of logic tests is wrong.

To perform this logic test, the if function in excel usually uses the excel comparison operator that we
discussed earlier. i.e. using operators =,>,> =, <or <= and so on.

Therefore, before you further study this logic function, it helps you understand first about the Excel
operators that we discussed earlier.

If you already understand enough about the comparison operators in excel then we will learn about
how to use the if formula in excel.
How to Use the IF Excel Formula
How do I use the IF function in an excel formula?

How to use the excel IF function or the excel IF formula in an excel formula or formula is to follow
the rules for writing the following formula:

SINTAKS FUNCTION
IF (Logic Test; Conditions Fulfilled)

From the syntax above, we can know that the IF formula or function in Excel consists of 3 arguments:

1. Logic Test: This argument contains logical expressions that can be evaluated into TRUE or FALSE
values. This argument is a reference criterion for determining the value that will be generated by
the excel IF formula.

2. Required Conditions: The value that will be generated if the Logistical Test results are TRUE. This
argument is a value that will be generated if conditions are met.

3. Unmet Conditions: (Optional) The value we want to produce if the TesLogika argument evaluates
to FALSE. This argument is of value if the logical test results are not met.

Example of an Excel IF Formula.

A simple example of the IF formula in excel is as follows:

= IF (1 = 1; "True"; "False")
In this example, the IF formula will produce the text "True" because the comparison of 1 = 1 is
True.

= IF (1 = 0; "True"; "False")
In this example, the IF formula will produce the text "Incorrect" because the ratio 1 = 0 is False or
False.

The use of the IF function in the excel formula can be used singly or double or stratified. The
purpose of the double IF excel formula is that we use nested IF functions or insert an IF excel
function into another IF formula.

For more details, see some examples of using a single if formula and the graded excel if formula in
excel below.
IF Single Formula.

Following is an example of the IF pass formula not passed as an example of using a single IF formula
in Excel:

In this example formula, we will test whether the number of values is more than 140 or not. If more
than 140 is declared Passed and vice versa if it is less than or equal to 140 then declared failed (not
passed).

In the example above, the excel formula used in cell F2 is:

= IF (E2> 140; "PASS"; "FAILED")

The excel formula above performs a logical test on cell E2 whether the value is more than 140 or
not. If the E2 value is more than 140 then the if formula will produce the PASS text. Conversely, if
the E2 value is not more than 140 then the IF formula will produce a FAIL text value.

The result of the if excel formula is "PASS", because the E2 value is 150 which means that the
number value in cell E2 is more than 140.

Next, consider the example of the IF formula in number 2. In example number 2, the excel if formula
used in cell F3 is:

= IF (E3> 140; "PASS"; "FAILED")

The excel if formula above produces the text value "FAILED", because the logic test in cell E3 (125) is
no more than 140.
In this example, the IF function only does one evaluation or logic test. then what if we want to do a
logic test several times with the if excel formula? Let's look at an example of the following multilevel
formula.

Double IF formula.

IF excel functions or formulas can also be included in other IF functions. This case is often also called
double if formula, multilevel if formula, nested if formula or branched if formula. Or in other terms
it is called the Nested IF Function.

The way to use a double excel if formula is to include another IF function in the ConditionFilled
argument or the ConditionFontfilled argument or both.

In Microsoft Excel 2007 or earlier versions, the application of this branched IF formula can only be
used up to a maximum of 7 levels. As for the excel 2010 version or newer, it can be used up to 64
levels or branches.

Double IF Formula When Conditions Are Fulfilled

The general formula for Double IF functions when conditions are met is as follows:

IF (TesLogika1;

IF (Logic Test 2; Conditions Fulfilled 2; [Conditions Not Fulfilled 2]);

[Unmet Conditions1])

Please consider the example of the double IF formula below:


In this example the double if formula used in cell F2 is:

= IF (C2> 60; IF (D2> 60; "PASS"; "FAIL"); "FAIL")

The IF formula above performs multiple logic tests on two cells at a time in stages:

1. If C2 is more than 60, do the advanced logic test using the 2nd IF formula. If C2 is not more than
60 then "FAILED"
2. In the 2nd IF formula if D2 is more than 60 then "PASS", if not then "FAIL".

The end result of the above formula is PASS, because the value of cell C2 and D2 are both more than
60.

Next, please look at example number 4. In example number 4 the if excel formula used in cell F5 is:

= IF (C5> 60; IF (D5> 60; "PASS"; "FAIL"); "FAIL")

The excel formula above produces a FAIL value because in the second if formula, the value of D4 (60)
is not more than 60.

Double IF Formula in Conditions Not Fulfilled.

The general formula for multiple IF functions when conditions are not met is as follows:

IF (TesLogika1;

Conditions Fulfilled1;

IF (Logic Test 2; Conditions Fulfilled 2; [Conditions Not Fulfilled 2]))

Examples of IF formulas that use this syntax are as follows:


In cell F2, for example this double excel if formula, the formula is:

= IF (C2 <= 60; "FAILED"; IF (D2 <= 60; "FAILED"; "PASS"))

The IF formula above performs multiple logic tests on two cells at a time in stages:

1. If C2 is less than or equal to 60 then the result is "FAILED", conversely if the value of C2 is More
than 60 then do a further logic test with the 2nd IF formula.

2. In the 2nd IF formula if the value of cell D2 is less than or equal to 60 then "FAILED", if not then
"PASS".

The end result of the above formula is PASS, because the value of cell C2 or D2 is NOT less than or
equal to 60.

Double IF Formula on Conditions Fulfilled and Not Fulfilled.

The general formula for multiple IF functions when conditions are not met is as follows:

IF (TesLogika1;

IF (Logic Test 2; Conditions Fulfilled 2; [Conditions Not Fulfilled 2]);

IF (Logic Test 3; Conditions Fulfilled 3; [Conditions Not Fulfilled 3]))


Examples of IF formulas that use this syntax are as follows:

In cell F2, for example this double excel if formula, the formula is:

= IF (C2 = "L";

IF (F2> 150; "PASS"; "FAIL");

IF (F2> 130; "PASS"; "FAILED"))

The IF formula above performs a double logic test in which each Value Argument is Filled and Value
Not Filled in the first IF is filled with another IF formula.

1. In this example the first IF function performs a comparison test by assessing whether the C2 value
is the text "L".

2. If true (TRUE) then proceed with the logic test with IF-2 (IF (F2> 150; "PASS"; "FAIL"))

3. If wrong (FALSE) or not "L", then the logic test is done with the 3rd IF (IF (F2> 130; "PASS"; "FAIL"))
IF FORMULA LEVEL

In the previous example the IF function is used Double or only 1 level (the first IF counts 0).

In practice, you can add or re-enter IF functions into each of the other IF formula levels. You can
learn about this example on this page: IF Leveled Formula For Value Conversion in Excel

Although you can use up to 64 levels if you are using Office Excel 2010 or newer, my advice should
not be to use more than 7 levels or tiered IF. Because in Excel 2007 or earlier, the IF function is
limited to only 7 levels.

In this case (IF function with more than 7 levels / branches), you should consider using other
methods such as the VLOOKUP formula.

NOTE IN USING IF FUNCTION

Here are some notes that you need to consider when using the If function in an excel formula.

-If you are using Microsoft Excel 2010 or a later version, the IF function can be used up to 64 levels
or branches to be stacked as the Conditions of Fulfill and Conditions of Non-Fulfillment when
compiling other more detailed logic tests.

-If you are using Microsoft Excel 2007 or an earlier version, the IF function can only be used up to 7
levels or branches.

-As an alternative to conducting logic tests with many conditions, also consider using the Lookup,
VLookup, HLookup, or Choose functions.

-Excel also provides several other functions that can be used to analyze your data based on certain
conditions or criteria. For example:

1. To determine the number of data strings (text) or numbers in the Excel data range, use the
Countif or Countifs function.

2. To calculate the total amount based on a text string or number in the data range, use the Sumif or
Sumifs worksheet functions.

IF FORMULES LEVEL FURTHER

After understanding how to use the IF excel formula, here are guidelines for using advanced IF
functions that you can learn:

1. For the combined IF and VLookup formula tutorial you can read on the following page: Combined
Excel IF and VLookup Formulas

2. For the use of IF functions combined with AND or OR functions (IF-OR, IF-AND, IF-OR-AND or IF-
AND-OR) you can learn on the following page: IF Formulas Combined with OR and AND functions

3. The combination of the IF function with the Min or Max function (MAX-IF, MIN-IF) can be read in
the following excel tutorial: Excel Max-if and Min-IF formula, Looking for the highest / lowest value
with criteria.

That's the first discussion on how to use the If function in Excel. .


If you have questions, suggestions or criticisms, please write in the comment box below. And share
this article on your social media accounts so your friends can also get the same benefits .. Greetings
Excel Class.

You might also like