IFS Google Sheets function

The IFS function in Google Sheets provides a streamlined way to evaluate multiple conditions within a single formula. Unlike the nested IF function, IFS allows users to specify numerous conditions and corresponding outcomes in a clearer and more efficient manner, making it an invaluable tool for data analysis and decision-making in spreadsheets.

Syntax

IFS(condition1, value1, condition2, value2, ..., condition_n, value_n)
  • condition1: The first condition to evaluate. If this condition is true, the function returns value1.
  • value1: The value returned when condition1 is true.
  • condition2: The second condition to evaluate.
  • value2: The value returned when condition2 is true.
  • condition_n: Additional conditions (up to 127 pairs). The function evaluates these in the order specified.
  • value_n: The value returned when condition_n is true.

Example #1

IFS(A1 > 90, "A", A1 > 80, "B", A1 > 70, "C")
This function checks the value in cell A1 and assigns a letter grade based on its value. If A1 is 95, it returns “A” as the result.

Example #2

IFS(B1 < 10, "Low", B1 < 20, "Medium", B1 >= 20, "High")
This function evaluates the value in cell B1 to categorize it as “Low”, “Medium”, or “High”. If B1 is 15, it returns “Medium”.

Example #3

IFS(C1 = "Yes", "Approved", C1 = "No", "Denied", C1 = "Maybe", "Pending")
This function assesses the value in cell C1 to determine the status. If C1 is “Yes”, it outputs “Approved” as the result.

Error handling

  • N/A: This error occurs if none of the conditions are true, and there is no default value provided.
  • VALUE!: This error arises if the conditions and values range is not properly set up, such as having an uneven number of conditions and values.
  • ERROR!: This indicates a syntax error in the function’s structure, often due to missing parameters or incorrect data types.

Conclusion

The IFS function is a powerful asset for users of Google Sheets, simplifying the task of evaluating multiple conditions without the complexity of nested IF statements. By clearly structuring your conditions and values, IFS enhances readability and mitigates errors, making it easier to interpret results in data analysis.

Leave a Reply

Your email address will not be published. Required fields are marked *