IF Statement That Returns YES or NO
A guide on how to create an IF statement that returns "Yes" or "No."
Last updated: Feb. 7, 2023
IF statements allow the formulas to make logical comparisons between a value and an expected outcome. In some cases, you can get a better overview of your progress by seeing a simple answer, for example, if your team has reached a target or not. This guide will help you to create an IF statement that returns a "YES" or "NO," depending on the employee performance compared to the target.

An example of a table that returns an IF statement in the column "Target Reached."
To create an IF statement with text, you can use a formula template like the following:
(
IF(Sum(<data_source>,<filters>,Field)>Target,"Yes","No")
)
Example
Let's say there is a data source called "Deals," containing a field called "Value." We want to see the total value of won deals for each employee and understand if they have reached their targets. In this case, assuming that all employees have the same targets, we can use a static number, for example, 50.000.

An example of a data source called "Deals."
To create an IF statement with text that is based on the data mentioned above:
- Go to Formulas > + New formula.
- Click on + New component, then select IF function.
To create an IF statement with text, based on the data mentioned above:
- Go to Formulas > + New formula.
- Click the Switch to Advanced editor button in the top-right corner.
- Give the formula a title and type in the following:
(
IF(Sum(Deals,Status="won",Value)>50000,"Yes","No")
)
4. Select Text in number formatting.
5. (Optional) Add conditional colors for the formula to return, for example, "Yes" in green and "No" in red.
6. To finish and create the formula, click Save in the bottom-right of the page.

An example of adding conditional colors in the formula editor.
The formula will check if the total value of won deals is greater than 50.000. If the statement is true, the formula will return "Yes." Alternatively, if the statement is false, the formula will return "No."
Build more formulas
Learn how to create an IF statement that returns 100% if the results are greater than 100%.
Was this article helpful?
Please leave a comment to help us improve.