Open In App

Google Sheets IF, IFS, AND, OR Logical Functions

Last Updated : 01 May, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Google Sheets is now famous as a spreadsheet that allows you to create and edit spreadsheets in a real-time world. Google Powerful logical functions like IF, IFS, AND, and OR are key tools in Google Sheets, a popular spreadsheet app for real-time collaboration. These functions unlock solutions to complex problems by letting you automate decisions based on specific conditions in your data. This guide will teach you how to leverage these functions to supercharge your spreadsheet analysis.

IF Function

The IF function is Google Sheets’ workhorse for conditional statements. It checks a condition (like A1>10) and returns a value if true (like “Yes”) and another value if false (like “No”). The syntax is simple: =IF(condition, value_if_true, value_if_false). Imagine it as a decision-maker in your spreadsheet – meeting certain criteria triggers one outcome, while not meeting it triggers another.

How to use the IF Function in Google Sheets

Step 1: Open Google Sheets

Open Google Sheets on your Desktop and select a new document to perform functions.

ezgifcom-resize-(5)

Open Google Sheets >> Select a Document

Step 2: Select a Cell

Now select the output cell in which you want to store the output of the function.

IMG_20240424_155934-ezgifcom-png-to-webp-converter

Select a Cell

Step 3: Type the Function and Values

Now type the ‘IF’ function and the values as its syntax: ‘=IF (‘ and then specify the condition inside the bracket that you desire to be checked. After specifying the condition enter the values that you want to display whenever the condition is true or false. For example: =IF(A1>10, “Yes”, “No”).

Screenshot951-ezgifcom-png-to-webp-converter

Type the IF Function

IFS Logical Function

Stuck with nested IF statements? Google Sheets offers the IFS function as a shortcut for evaluating multiple conditions. Think of it like a layered IF statement. Simply list your conditions and corresponding outputs, and IFS will return the result for the first true condition it encounters. This keeps your formulas clean and efficient, especially when dealing with many scenarios.

How to Use IFS Logical Function in Google Sheets

Step 1: Open Google Sheets and Select a Cell

Open Google Sheets to perform logical functions and select a cell in which you want to store the output of the “IFS” function.

IMG_20240424_155934-ezgifcom-png-to-webp-converter

Select a Cell

Step 2: Type the Function

Now type the function “IFS” as its syntax: ‘=IFS (‘ in the cell and then specify the conditions and values.

Screenshot957-ezgifcom-png-to-webp-converter

Type the Function “=IFS(

Step 3: Specify Conditions and Values

After entering the function start specifying the conditions and values that you would like to execute.

For example: =IFS(A1>10, “High”, A1>5, “Medium”, A1>0, “Low”).

Screenshot952-ezgifcom-png-to-webp-converter

Type the Function “IFS(“

AND Logical Function

AND Logical function is also a conditional function in Google Sheets and is used to check if all the conditions present in the function are true. In the case that all the conditions are true then it will return “True” and if any one of the conditions is false then it will be turned to “False”.

How to use AND Logical Function in Google Sheets

Step 1: Open Google Sheets and Select a Cell

Open Google Sheets to perform logical functions and select a cell in which you want to store the output of the “AND” function.

IMG_20240424_155934-ezgifcom-png-to-webp-converter

Select a Cell

Step 2: Type the Function

As always type the “AND” function in the selected cell as its syntax: ‘=AND (‘ and then you have to specify all the conditions you want to enter.

Screenshot958-ezgifcom-png-to-webp-converter

Tye the “AND” function

Step 3: Specify the Condition and Values

Now specify the desired condition and value you want to check and after the syntax is over your result will be on screen.

For example: =AND(B2>80, B2 < 90).

Screenshot953-ezgifcom-png-to-webp-converter

Specify the Conditions and Columns

OR Logical Function

The OR function is like the “inclusive OR” in everyday language. In Google Sheets, it only needs one condition to be true out of multiple for the entire function to return TRUE. Think of it as a shortcut – if any of your listed conditions (like A1=”apple” or B1>5) are met, the OR function returns TRUE. This is useful for checking if data meets at least one of several criteria.

How to use OR Logical Function in Google Sheets

Step 1: Open Google Sheets and Select a Cell

Open Google Sheets to perform logical functions and select a cell in which you want to store the output of the “OR” function.

IMG_20240424_155934-ezgifcom-png-to-webp-converter

Select a Cell

Step 2: Type the Function

Start with entering the “OR” function in the selected cell as its syntax: ‘=OR (‘ and then enter the conditions and values.

Screenshot959-ezgifcom-png-to-webp-converter

Type the “OR(” function

Step 3: Specify the Conditions and Values

After entering the “OR” function specify the conditions and values that you would like to check.

For example: =OR (A1=”Yes”, A1=”True”)

Screenshot954-ezgifcom-png-to-webp-converter

Specify the Conditions and Values

Conclusion

Mastering logical functions (IF, IFS, AND, OR) unlocks the power of Google Sheets for data analysis. These functions let you automate decisions, handle complex scenarios, and streamline your workflow. IF statements handle basic true/false conditions, while IFS tackles multi-condition evaluations. AND ensures all conditions are met, and OR only needs one condition to be true. By using these functions, you can supercharge your spreadsheet analysis and extract valuable insights from your data.

Logical Functions in Google Sheets – FAQs

What is the Syntax for using the “IF” function?

You can use the “IF” function by using the syntax: “=IF (logical_test, value_if_true, value_if_false)”.

Can I use the nested “IF” function in Google Sheets?

Yes, Google Sheets allows you to use the nested IF to perform your logical functions. For example: “=IF(A1>10, “High”, IF(A1>5, “Medium”, “Low”))”.

How Can I Use the “AND” function in Google Sheets?

In Google Sheets you can use the “AND” function by the syntax: “=AND(condition1, condition2, …)”.

What is the IF formula with multiple conditions?

While there isn’t a single IF formula for multiple conditions, you can use nested IF statements or the IFS function (introduced in Google Sheets later than the IF function).

Can you use or in an if statement in Google Sheets?

Absolutely! You can combine the OR function with the IF function to create conditional statements that check if any of multiple conditions are true.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads