How to Do IF THEN in Google Sheets [IF ELSE Condition]

How to do if then in google sheets 20
Key Takeaways: How to Do IF THEN in Google Sheets

To Perform IF THEN in Google Sheets

  1. Open the Format tab.
  2. Select Conditional formatting.
  3. Create a rule to highlight cells with “Eligible“.
  4. Apply formatting to a single cell or extend it to an entire column.


  1. Choose the cell for bonus eligibility.
  2. Begin with an equals sign (=).
  3. Enter “IF” to initiate the IF function.
  4. Inside the parentheses, provide the logical test (e.g., Sales >= Target).
  5. Insert a comma.
  6. Input “Eligible” (in double quotes) for the true result.
  7. Add another comma.
  8. Type “Ineligible” (in double quotes) for the false result.
  9. Close the function with a closing parenthesis and hit Enter.
  10. The cell now displays “Eligible” or “Ineligible” based on the logical test.

Today we will learn how to do if then in Google Sheets. If then is identical to if-else. We can make a nest of “if and else” or “if and then” to check for various conditions and perform different actions accordingly. In the spreadsheet to answer some key questions we IF/THEN function Google sheets. In Google sheets the IF function allows you to check a condition and return a specific value if it’s TRUE or FALSE. If/Then the function in Google sheets seems complex but it is not.

Although IF/Then function is beneficial while working in a spreadsheet. The If/Then function is a statement of the IF function that performs a specific action when a condition is met after evaluation or a logical test. At the same time, if the condition isn’t met, then the function will return the “FALSE” result. This functionality is related to conditional formatting in Google sheets.

But conditional formatting formats the cell only; it does not give the value true and false like the IF/Then function. You tell Google Sheets if something is true, it needs to do one thing, but if it’s false, Google Sheets needs to do something else. Let’s study more about the above article on How to do if then in Google sheets.

Importance of using IF ELSE condition in Google Sheets

Google Sheets is providing so many features to their users to work more professionally and efficiently, such as the SUMIF, IF NA, and IF CONTAINS functions. Similarly, IF/THEN is one of them. There are many scenarios where we may need the If/Then function. For example, if you are working on a spreadsheet in which you are making students’ marks reports. In a student’s marks report you must write the status at the end of whether the student passes or fails. So, you don’t need to write the status one by one for every student. You can apply the If/Then function which will be criticized automatically.

Similarly, you can use the If/Then function for different criteria, like you can score the examinations of students, eligibility criteria for employees, sale purchase targets, and many more. Here are some examples that are described below. So, let’s move on to the next section of the article on how to do if then in Google sheets.

How to do IF THEN or IF ELSE Condition in Google Sheets

First, you must understand the criteria to apply the IF function in your spreadsheet and you must understand the logical test value and the condition which you want to apply then write the syntax accordingly. I am going to make you understand the If/Then function with the help of students’ marks report. We will find which student passes or fail by If/Then function. Let me show you how it works.

Step 1

Let’s suppose this is our sample data from Mark’s report. Where some students are listed with their obtained marks. Now it is time to check who is passing or failing.

How to do if then in google sheets 1

Step 2

First, locate your cursor where you want to get your results to apply the function.

How to do if then in google sheets 2

Step 3

Let’s start writing the formula with an equal sign as in all formulas and then the formula which is the IF function.

How to do if then in google sheets 3

Step 4

After opening the bracket, give the logical test value which would return the results negative or positive. In this table, logical test values are the student’s marks which are met with passing marks if the result will be Pass and if it does not the results will be Fail.

How to do if then in google sheets 4

Step 5

Here I have used the greater than and equal sign to give the condition that if marks are greater than or equal to the required condition.

How to do if then in google sheets 5

Step 6

It depends on you what condition you use. Here I am using the number “40” as targeted passing marks. If students reach this target, they will pass otherwise they will fail.

How to do if then in google sheets 6

Step 7

Now tell Google sheets your answer by If/Then function if it is true or false. Here I am writing “Pass” when it is true.

How to do if then in google sheets 7

Note: Must keep in mind that you give your answer in inverted commas.

Step 8

And then the second answer which is false, where we have used “Fail“.

How to do if then in google sheets 8

Step 9

Your syntax is almost complete, just close the bracket and press the Enter key to get the results.

As below the results are in front of you.

How to do if then in google sheets 9

Step 10

To get the results for all students you don’t need to write formulas again, just drag the first answer over others.

How to do if then in google sheets 10

Step 11

As you can see below, we have gotten all the student’s statuses whether they pass or fail with the help of the If/Then function. As you can see in the following picture students who have not taken marks 40 or more than 40 as we gave the condition fail.

How to do if then in google sheets 11

How to do If then in Google Sheets – Another Use Case

The above tutorial is enough to understand the If/Then function but as we discussed the If/then the function can be used in scenarios so if you are still a victim of complexity then I have another example below to make you better understand. In the following tutorial, we have some employees’ data who have made sales for the month. Now we will check the bonus eligibility of those who have made the required sale for the month. If/Then function will tell us whether it is eligible or not. Let’s do it practically

Step 1

This is the sample of data where all employees’ names are described.

How to do if then in google sheets 12

Step 2

In the second column, we have the number of sales made by every employee. And in the third column, there is the target given by the boss for the month. Let’s see who achieved the target

How to do if then in google sheets 13

Step 3

Let’s start our function with is equal sign and function name as all functions do. Then giving the address of the sale made by the employee.

How to do if then in google sheets 14

Step 4

Now I am giving the condition that if the sale made by the employee is greater than or equal to the target sale mentioned below by its cell address C5.

How to do if then in google sheets 15

Step 5

After putting the comma give the TRUE and FALSE values in inverted commas. As I have given here Eligible IF it is true and Ineligible If it is False and then the bracket closed. Your syntax is completely hit the Enter button.

How to do if then in google sheets 16

Step 6

You have done it correctly your answer is in front of you as the employee in the first row is eligible for a bonus. For all employees just drag the first answer.

How to do if then in google sheets 17

Step 7

To verify the function you can check the results as this highlighted employee sales doesn’t meet the given target so the result is Ineligible.

How to do if then in google sheets 18

Frequently Asked Questions

Is the IFS Function in Google Sheets Similar to IF THEN Condition?

The usage of google sheets’ ifs function is comparable to an IF THEN condition. It allows users to evaluate multiple conditions and outcomes within a single formula, simplifying complex logical operations. This function is particularly useful when you need to test various conditions and return specific results based on those conditions.

Q: Can we use conditional formatting too in the If/then formula?

Yes! We can use conditional formatting as well over the IF/Then function. It might be necessary somewhere to highlight the TRUE sign with positive green color and the FALSE sign with negative color which you can easily do with conditional formatting. Below is an example to understand.

Step 1

To open the conditional formatting pane menu go into the Format tab in the menu bar of the Google sheets where you will find the conditional formatting option in the drop-down menu click on it to open.

How to do if then in google sheets 19

Step 2

A sidebar menu has been opened. Let’s apply a rule that if my answer is eligible, fill it with green color.

For this condition select the format cell “Is equal to” and write eligible in the box then apply the formatting and then click on the done button.

How to do if then in google sheets 20

Step 3

You can select the whole column before applying but if you didn’t then just drag the first cell over the other.

As you can see the result is below in the following picture.

How to do if then in google sheets 21

Q: What is the difference between IF and IFS functions?

IF function can be used in only one condition while the IFS function is used in numerous conditions in Google sheets. As IF function returns to the results of one condition either true or false while the Google sheets IFS function can give more statements if given according to criteria. You can say in other words IFS function is an advance or upgrade part of the IF function.

Q: How to write the IF function in Google Sheets?

IF function seems too little complex but it’s easy if you understand the logic of syntax, let’s try to understand,

Syntax: IF(logical_expression, “value_if_true”, “value_if_false”)

The function starts with its name IF after the equal sign.

The first argument logical_test in the formula is a cell containing an expression in which the condition is checked that would return a logical value TRUE or FALSE.

The second argument value_if_true is the value the function will return if the logical expression is true. Don’t forget to put the inverted commas while writing True value otherwise, you may get the error.

Third argument value_if_false is an optional parameter, if the checked condition was not met, the result of the function would return FALSE. Similarly, False values must be careful with inverted commas.


Today we learned, how to use if then in Google Sheets. If you are aware of basic programming, you must understand it as If else, or nested if else. If you were thinking that the IF function is much more difficult than I hope by reading the above article on how to do it then in Google Sheets with two different and easy examples, you will not be afraid of applying the IF function in your spreadsheet.

Hope the above very detailed steps would make you comfortable with the If/Then function of Google sheets. For more easy solutions stay connected with Office Demy.

Content Protection by

M. Shaiq Ansari

Hi, I am Shaiq, I am a highly skilled technical writer working full-time for Office Demy. I am specialized in Google Workspace and Microsoft Office applications. With a background in Software Engineering, I possess a deep understanding of the intricate functionalities and features of these productivity tools. Connect me on Linkedin
Enable registration in settings - general