How to Use if Function in Google Sheets

In order to perform a logical test inside of a formula in Google Sheets, you will need to make use of the IF function, which will then allow you to deliver a variety of replies depending on whether or not the test was successful. In a logical test, the outcome of which is always either true or false, the IF operator is used to determine whether a single cell or range of cells fits particular conditions in order to decide whether or not the name of the operator, which suggests what the test is intended to be used for, is accurate. 

This is done in order to determine whether or not the name of the operator, which suggests what the test is intended to be used for, is accurate. In the event that the IF test returns the value TRUE, Google Sheets will either return a number or text string, carry out a computation, or execute another formula. If the value TRUE is returned, the IF test was successful. In the event that the outcome is not true, it will carry out a completely different action. It is possible to combine the IF statement with other logical functions like AND and OR, as well as with more IF statements that are nested within one another.

The Purpose of Google’s If() Function

The If () function in Google Sheets is designed to test whether a certain condition in a cell is true or false. It allows you to perform different operations based on the result of the test. This makes it a valuable tool for conditional calculations and data analysis.

The Syntax and Arguments of the If() Function

The syntax of the If() function is as follows:

  • =if(test, then_true, otherwise_value)

Let’s break this down:

  • Test: This is the value or expression that is tested to determine if it is true or false.
  • Then_true: This is the operation that will be performed if the test is true.
  • Otherwise_value: This is the operation that will be performed if the test is false.

How to Use the If() Function in Google Sheets

Here’s a step-by-step guide on how to use the If() function in Google Sheets:

  1. Select the cell where you want the result of the If() function to appear.
  2. Type the equal sign (=) followed by “if”. As you type, the automatic suggestion box will appear.
  3. Select the “if” function from the suggestion box to open the parentheses.
  4. Enter the test argument by specifying a value or expression that you want to test.
  5. Separate the test argument from the then_true argument using a comma.
  6. Enter the then_true argument, which is the operation to be performed if the test is true.
  7. Separate the then_true argument from the otherwise_value argument using another comma.
  8. Enter the otherwise_value argument, which is the operation to be performed if the test is false.
  9. Close the parentheses and press Enter to complete the If() function.

Real-world Examples of the If() Function

Let’s look at a couple of real-world examples to demonstrate how the If() function can be used:

Example 1:

Suppose you have a test score in cell A2, and you want to check if the score is higher than 35. If it is, you want the cell B3 to display “Pass”; otherwise, you want it to display “Fail”.

  • Formula in B3: =if(A2>35, "Pass", "Fail")

Example 2:

Imagine you have a sales report, and you want to calculate the commission based on the sales amount. If the sales amount is greater than 1000, the commission rate should be 10%; otherwise, it should be 5%.

  • Formula in B3: =if(A2>1000, A2*0.1, A2*0.05)


How if functions work in our Google sheet?

Google Sheets has a built-in IF tool that you can use to write an IF statement: =IF(logical_expression,value_if_true,value_if_false). You can use the following formula to return “Yes” or “No” based on whether the amount is greater than or equal to $4000: =IF(B2>=4000,”Yes”,”No”).

How do you write an if then formula?

If-THEN is written as =IF(logic test, value if true, value if false). What to do if the comparison is true is given by the first point. The second input tells the function what to do if it finds that the comparison is not true.

Editorial Staff
Editorial Staff
The Bollyinside editorial staff is made up of tech experts with more than 10 years of experience Led by Sumit Chauhan. We started in 2014 and now Bollyinside is a leading tech resource, offering everything from product reviews and tech guides to marketing tips. Think of us as your go-to tech encyclopedia!


Please enter your comment!
Please enter your name here

Related Articles

Best Telemedicine Software: for your healthcare practice

Telemedicine software has transformed my healthcare visits. It's fantastic for patients and doctors since they can obtain aid quickly. I...
Read more
I love microlearning Platforms in today's fast-paced world. Short, focused teachings that engage me are key. Microlearning platforms are great...
Think of a notebook on your computer or tablet that can be changed to fit whatever you want to write...
As of late, Homeschool Apps has gained a lot of popularity, which means that an increasing number of...
From what I've seen, HelpDesk software is essential for modern businesses to run easily. It's especially useful for improving customer...
For all of our important pictures, stories, and drawings, Google Drive is like a big toy box. But sometimes the...