Table of Contents
This tip is about the how to Use IF THEN Statements In Google Sheets. So read this free guide, How to Use IF THEN Statements In Google Sheets step by step. If you have query related to same article you may contact us.
How to Use IF THEN Statements In Google Sheets – Guide
If/then sentences are often considered difficult. However, they are not difficult to perform in reality. Also, when working with certain datasets or phrases in a spreadsheet, they can be more valuable than you realize. This should be familiar territory if you’ve worked with Microsoft Excel before. However, if you are new to spreadsheets, the following information will be helpful. Google Sheets is a free application from Google that allows users to exchange, generate and manage essential data.
If you’re new to spreadsheets, the If/Then statements might seem confusing at first. Functions are a method of calculating data in your worksheet. There are a few basics to using the predefined functions in Google Sheets, whether it’s something as easy as the ‘SUM’ function, which adds numbers for you, or something more complex. For a function to perform effectively, you must properly organize the function into its cells. For example, start the function with the “=” sign, then the function name, and finally the argument.
Using the IF function
The IF function can be used alone in a single logical test, or you can nest multiple IF statements in a single formula for more complex tests.
The calculations also work well as a logical test. In the following example, the IF formula in cell A4 is testing whether cell B4 has a numeric value equal to or greater than the number 10. If the result is TRUE, it will return the number 1. If false, it will return the number 2.
An IF statement being used in Google Sheets, returning a FALSE result. In the example, cell B4 has the value 9. This means that the logical test result is FALSE, with the number 2 shown.
nested IF statements
If you want to perform a longer and more complex logical test, you can nest multiple IF statements in the same formula. To nest multiple IF statements together in a single formula, type simple =IF(first_test, value_if_true, IF(second_test, value_if_true, value_if_false)). While this only shows a single nested IF statement, you can nest as many IF statements as you need.
For example, if cell B3 is equal to 4, the SE formula in A3 will return 3. If cell B3 is not equal to 4, a second IF statement is used to test whether cell B3 has a value less than 10. returns the number 10. Otherwise, it returns 0. This example test has its own IF statement nested as the first argument “value_if_false”, requiring the first test to be FALSE before the second test is considered.
A Google Sheets spreadsheet showing nested IF statements multiplied with TRUE and FALSE results
The example above shows all three potential results of this test. With the first logical test (B3 equals 3) returning a TRUE result, the IF formula in cell A3 returned the number 4. The second logical test returned another TRUE result in cell A4, with the value of B4 less than 10.
The only FALSE result is returned in cell A5, where the result of both tests (if B5 is equal to 3 or less than 10) is FALSE, returning the result FALSE (a 0). You can use a nested IF statement as the “value_if_true” argument in the same way. To do this, type =IF(first_test, IF(second_test, value_if_true, value_if_false), value_if_false).
For example, if cell B3 contains the number 3 and if cell C3 contains the number 4, return a 5. If B3 contains a 3, but C3 does not contain a 4, return a 0. If B3 does not contain a 3, return number 1. A Google Sheets formula containing nested IF statements with multiple TRUE and FALSE results. The results of this example show that for the first test to be true, cell B3 must equal the number 3.
From there, the “value_if_true” for the initial IF uses a second nested IF statement to do a second test (whether C3, C4, C5 or C6 contain the number 4). This gives two potential “value_if_false” results (a 0 or a 1). This is the case for cells A4 and A5. If you don’t include a FALSE argument for the first test, Google Sheets will return an automatic FALSE text value to you. This is shown in cell A6 in the example above.
Final note
I hope you like the guide How to Use IF THEN Statements In Google Sheets. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.