In this video we discuss how to check or test if a condition is true or false in excel. We go through a few detailed examples step by step and also discuss different types of outputs
Transcript/notes
To check if something is true or false in excel, we use the IF function. As an example, here are some cells with numbers and text in them. As an example, let’s say we want to know, true or false, if daily products sold is greater than 200.
We are going to put the answer in cell c2, so left click on C2 so it is highlighted. Next, we type in an equals sign, and then we type in if, and a drop down box will appear. In the box, we are going to left double click on the top option, if. Next, we need to put in the test condition, which is, is the daily products sold greater than 200, to do this we left click on cell B2, as this is the cell we are testing. Now, we need to input the conditions, type in a greater than sign, followed by 200, and then type in a comma.
From here we need to input the result we want excel to output if the condition is true, which in this case is the word true, so type in true followed by a comma. Next, we need to input the result we want excel to output if the condition is false, which in this case is the word false, so type in false, and then to close off the function we type in a closed parenthesis. So, the way to read this is, if the value in cell B2 is greater than 200 output true, and if the value in cell is not greater than 200 output false.
Now we hit the enter key and we have our answer of true.
I have added some more days and numbers into the sheet, and I’m going to use the fill handle to pull down and you can see the results.
A couple of notes, here are the operators that are used to test conditions.
And if you want an output of true or false, those words do not need quotations around them. Here in cell C6, I have the same condition, but the output will be yes or no. I will hit enter and we get an error. To correct this, any output that is text needs to have quotations around it. So, here I have corrected it, both yes and no are surrounded by quotations, I’ll hit enter and we have our output.
This also goes for if you are testing text values, not numbers. Here I have store locations and in the if statement Huntley is in quotations, capitalization does not matter here. I’ll hit the enter key.
And one last example, if you are outputting numbers, as you see in this example, no quotations are needed, I’ll hit the enter key and we have a 2 as the output for it being false. Fill handle to fill in the rest.
Chapters/Timestamps
0:00 Example set up
0:10 Example 1 start
0:26 How to enter test condition
1:11 Final example 1 formula
1:36 Different types of operators
1:46 Different text outputs
2:08 How to test text values
2:21 Number outputs
Информация по комментариям в разработке