We can check if the cell is greater than some value, very easily using the excel’s IF() function.
What is IF()?
If we want to evaluate some condition in excel, we can achieve that by using the IF() function.
The IF() function returns true if a condition is met and false otherwise.
“cnd” in the formula represents some condition that would get evaluated.
How to use the Formula to check if a cell is greater than?
Figure 1. Example 1 of IF() to check if a cell is greater than
In this example, we created a small table containing students information. We want to apply IF() on this table to see if the marks are greater than 50. Let’s see how you can do that.
- Select any column, where you want to display the status of a particular student. In this case, we selected H10.
- Go in the function box and type IF FUNCTION.
- Give the arguments i.e. the condition. For H10 column we gave G10>50,”Pass”,”Fail”.
- If the condition is true, Pass will be written in H10 cell, Fail otherwise.
- You can observe in the column H10 that status is “Fail”. This is because G10 cell has a value of 47, which is less than 50.
Alternative Way of Checking If the cell is greater than any other cell
Figure 2. Example 1 of “>” to check if a cell is greater than
We can also check if a cell is greater than any other cell without using IF() Function. Here is an example using the “>” operator. The logical operator “>” gives either true or false.
In this example, we are comparing the prices of Item1 and Item2.
- Select any column, where you want to display the status for a particular item. In this case, we selected I35.
- Go in the function box and type G35>H35.
- If Item1 has a larger price then “True” will be printed out, “False” otherwise.