How to Use IF Function in Google Sheets – Advanced Tips

0
132
IF Function in Google Sheets

Much have been talked about the popular IF Function in Google Sheets here on Info Inspired. Should I write a separate tutorial for it again? This question was in my mind for a quiet long time. The reason, I have already written lots of tutorials that touched this logical function, but in true sense there is no specific tutorial on it.

I have already made comparison of IFS and Nested IF, IF with Google Sheets AND, OR functions in combined form and many such variations. But the thing is that I don’t have here a specific tutorial for IF function in Google Sheets. I wish to cover that void spot with this tutorial.

What is the use of Google Doc Spreadsheets IF function?

With the help of IF function, you can test value in a cell. That is the one and only use of it. IF function can bring much more dynamism to your formulas in Google Spreadsheets. Another similar functions are SUMIF and SUMIFS.

What is Logical Test in IF Function?

As already told you above, IF function, can test value in a cell. But it’s a logical test. Let us see how can we logical test a value in a cell using Google Sheets IF function.

Suppose Cell A1 has a value 50. With IF function, you can apply different logical tests on that value as below.

IF(A1=50 – It’s meaning is whether the value in A1 is equal to 50. It’s a logical test, right?

IF(A1<>50 – Here the meaning is whether the value in A1 is not equal to 50.

IF(A1<50 – Here the meaning is whether the value in A1 is less than 50.

IF(A1>50 – Here it checks whether the value in A1 is greater than 50.

IF(A1<=50 – Here we can test whether A1 value is less than or equal to 50.

IF(A>=50 – Here we can test whether A1 value is greater than or equal to 50.

With IF you can test the value as above and if found a match, it returns true, else false. Similarly you can test text string or date using IF.

IF Function Syntax and Explanation

Now let us move to the syntax and arguments.

Syntax:

IF(logical_expression, value_if_true, value_if_false)

Now you can clearly understand the arguments in the function.

Logical Expression:  In the above example we put one value in Cell A1 and tested it with different operators like less than, greater than etc. You can say “A1<50” as an example to logical_expression in IF function.

Value If True: Once tested the function can return whether the answer is true or false. The “value_if_true” argument deals with the true part.

Value If False:  The “value_if_false” argument deals with the false part.

The last two arguments, you can understand from the below examples.

How to Use IF Function in Google Sheets?

Now it’s time to go through few examples of IF function to understand it fully. I’ve applied different colours to make you understand all the arguments in the syntax.

Here is the syntax once again.

IF(logical_expression, value_if_true, value_if_false)

Google Sheets IF Function examples

Use this spreadsheet copy and change the values under Column A to understand the function properly.

Conclusion

After learning the proper use of Google Sheets IF, don’t just limit the use of it to that extend only. Move to the advanced use of Google Doc’s IF Function. Our Nested IF tutorial can help you a lot in this direction.

LEAVE A REPLY

Please enter your comment!
Please enter your name here