How To Use The Basic IF Function (Formula) In Excel Explained - Text, Symbols, And Blank Cells

Whats Up Dude
Whats Up Dude
1.2 هزار بار بازدید - 11 ماه پیش - In this video cover the
In this video cover the basic IF function or formula in excel.  We go through several examples of how to input and use the function, and we go over several symbols used, and putting a formula into the IF function

Transcript/notes
The If formula is a powerful tool in excel.  This is the basic text input for an if function or formula.  An equals sign, the word if, then an open parenthesis, next is the logical test, then a comma, then a value if true, than another comma, then a value if false, followed by a closed parenthesis.

We are going to go through some different basic examples of how to use the if function.

Here is a table I made up for 5 different employees, hours worked, days worked and number of sales.

In column E, we are going to create an if function based on if the employee worked exactly 5 days.  To do this we left click on the first answer cell, cell E2, so it is highlighted.  Next, we type in an equals sign, then we type in the letters if, and a drop down box will appear with some options.  We are going to left double click on the top option, IF.  Now, in our answer cell we have the word if then an open parenthesis, this is asking us to put some information in here.  

We are going to type in the formula, then I will explain its parts in detail.  First have to input the logical test, which is did the employee work 5 days, and that data is located in column C, so, we are going to left click on cell C2.  Next, we type in an equals sign, then we type in a 5.  From here, we type in a comma, then we type in quotation marks, then we type in the word yes followed by quotation marks.  Next we type in a comma, then we type in quotation marks, then we type in the word no followed by quotation marks.  And to finish off, we type in a closed parenthesis.

So, in the parenthesis, there are 3 parts, we have the logical test of did the employee work 5 days, then we have the output we want if the test is true, then we have the output if the test is false.

From here, we hit the enter key, and we have our output of yes, because employee 1 did work 5 days.

I am going to left click on cell E2, go down to the bottom right hand corner and left click and drag down, release the click and hold, and the other cells in the column have been filled in.

One note, when you are dealing with text in an if function, it must be surrounded by quotation marks, numbers, however, do not need quotation marks.  

As another quick example of this, in cell F2, I have inputted another if function, this time based on the value in column E.  The test is if the value in cell E2 equals yes, if this is true, then output a 1, if this is false, then output a 2.  As you see, the text yes is surrounded by quotation marks, and I put a small y on the word yes, as the if function is not case sensitive.  I hit the enter key, and a 1 has been outputted.

Again, I'm going to click and drag to fill in the column, and you can see the outputs.

Next, we are going to quickly go over inequality symbols.  For greater than or equal to, in the test section, you type in a greater than symbol followed by an equals sign.  Here is an example in column G, cell G2, I have typed in the complete formula.  The test is did the employee have 10 sales or more, which is column D, so, is the value in cell D2 greater than or equal to 10, if true output yes, if false output no.  I hit the enter key and no is inputted in cell G2, as employee 1 had only 9 sales.

For less than or equal to, in the test section, you type in a less than symbol followed by an equals sign.  Here is an example in column H, cell H2, I have typed in the complete formula.  The test is did the employee work 20 hours or less, which is column B, so, is the value in cell B2 less than or equal to 20, if true output 1, if false output 2.  I hit the enter key and 2 is inputted in cell H2, as employee 1 worked 36 hours, which is not 20 hours or less.

And one last example.  In cell I2, the test has a formula.  If the employee has a sale for every 3 hours of work, they get a $100 bonus.  So, is cell B2 divided by cell D2 greater than or equal to 3.  Hit the enter key and you see that only employee 1 has the bonus.

One very last note, if you leave a false statement blank, as you see in this function, it will automatically output a zero.  And if you want a blank cell as an output, type in double quotation marks, as you see here in this example.

Chapters/Timestamps
0:00 Basic text input for an IF function in excel
0:34 Example IF function using an equals sign
1:38 IF function parts explained
2:08 Dealing with text in a IF function in excel
2:18 Example of an IF function with text in it
2:51 IF function using greater than or equal to
3:26 IF function using less than or equal to
3:59 Using a formula in an IF function
4:25 Leaving a true or false statement empty
4:35 Blank cell output in an IF function in excel
11 ماه پیش در تاریخ 1402/05/17 منتشر شده است.
1,249 بـار بازدید شده
... بیشتر