How to use the IF function in Excel

How to use the IF function in Excel


How to use the IF function in Excel

Learn how to use the IF function in Microsoft Excel. This tutorial demonstrates how to use Excel IF with an easy to follow example. We also point out one of the most common mistakes made when using the IF function.

IF Function (and sample data):
https://www.techonthenet.com/excel/fo

Excel Tutorials:
https://www.techonthenet.com/excel/in

Don’t forget to subscribe to our channel for more great Excel tutorials!

Visit us at: https://www.techonthenet.com
or follow us on:

Facebook: https://www.facebook.com/techonthenetcom
Twitter: https://twitter.com/tech_on_the_net
Pinterest: https://www.pinterest.com/techonthene


Content

0.02 -> The IF function is the most important Logical function in Excel
5.14 -> The IF function is used to test for a condition and return one value if the condition is TRUE
10.26 -> and another value if the condition is FALSE
13.28 -> To illustrate how the IF function works, let's look at an example
17.624 -> Here we have a table of data that consists of Item and Quantity columns
22.48 -> Let's use the IF function to return a value of "Reorder" if the quantity is less than 10
28.98 -> To get started, let's begin by entering the IF command
33.22 -> As you can see, the IF function takes 3 parameters, with the last parameter being optional
40.32 -> The first parameter is the condition or value to test
44.48 -> In our example, we want to test to see if the value in cell B2 is less than 10
50.6 -> so we will enter B2
56.7 -> The second parameter we will need to enter is the value to return if the condition is TRUE
62.06 -> In our example, we will enter the value "Reorder"
65.3 -> This means that if the value in cell B2 is less than 10, the IF function will return "Reorder"
72.26 -> The third parameter is optional
74.64 -> If provided, it contains the value that will be returned if the condition evaluates to FALSE
80.76 -> To highlight a common mistake, we will leave this parameter out in our example
85.38 -> Now that we have entered all of the IF function's parameters
89.04 -> let's complete the command to examine the result
92 -> You should see the value "Reorder" appear in cell D2
95.62 -> Since cell B2 contains the value of 7, which is less than 10, the if function will return "Reorder"
102.58 -> Now let's copy our formula into cells D3 to D5
113.16 -> Notice that in cells D3 and D4 the value FALSE appears
118.1 -> Since we didn't specify a third parameter in our formula, the IF function will return FALSE
123.588 -> when the condition evaluates to FALSE
126.16 -> Many make the mistake of assuming that by leaving out the third parameter
130.587 -> the IF function will return a blank result when the condition is FALSE
135.06 -> To avoid unexpected results, it is a good idea to always enter the third parameter
140.02 -> So let's rewrite our formula to return a blank value when the condition evaluates to FALSE
145.88 -> In cell E2, we will enter our IF command and again use B2
152.66 -> and "Reorder" for the second parameter
155.3 -> This time, however, we will enter 2 quotation marks ("") as a third parameter
160.4 -> This represents a blank value or empty string
164.9 -> Now let's complete the command and copy our formula into cells E3 to E5
176.46 -> This time, we can see that instead of returning FALSE for rows 3 and 4
180.86 -> the if function has returned a blank cell
183.3 -> So when you write your IF function, remember to include both the value to return when the condition is TRUE
189.52 -> as well as the value to return when the condition is FALSE
192.94 -> This completes our example of how to use excel's IF function
196.32 -> if you would like to see more IF examples
198.76 -> or would like to download the sample data we used for this tutorial
202.32 -> please visit our web site at TechOnTheNet.com
205.42 -> If you found our tutorial helpful, please leave a like on this video
209.28 -> and don't forget to subscribe to our YouTube channel for more great Excel tutorials

Source: https://www.youtube.com/watch?v=Zs9NuYw-F7k