# How to Use IF Statement with Yes or No in Excel (3 Examples)

Get FREE Advanced Excel Exercises with Solutions!

Using this function, it is possible to analyze text, values, and even errors. It extends beyond simply determining whether two things are equal and then giving one answer. According on our needs, we can also use mathematical functions and perform extra calculations. We can combine numerous functions together for several tests. This article will show you how to use the IF function with a yes or no statement in Excel.

## Introduction to IF Function

Objective

The Excel IF function performs a test on a specified condition and outputs two values: one for a TRUE outcome and another for a FALSE one.

Syntax `=IF(logical_test, value_if_true, value_if_false)`

Arguments Explanation

Argument Required/Optional Argument Explanation
Logical_test Required This is the condition to be tested and evaluated as either TRUE or FALSE.
Value_if_true Optional The value that will be returned if the logical_test evaluates to TRUE.
Value_if_true Optional The value that will be returned if the logical_test evaluates to FALSE.

Available in:

• The IF function is available from Microsoft Excel 2000.
• Here, we will use Microsoft Excel 365.

## 3 Suitable Examples to Use IF Statement with Yes or No in Excel

This article will demonstrate how to use the IF function with yes or no statements in Excel. So, we will determine some yes or no comments on the basis of the text, numbers, and different criteria.

### Example 1: Applying IF Function for Numbers with Yes or No Statement in Excel

In the first section, we will show how to make an action a comment with a yes or no statement in a sample data set of unit sales and a targeted unit sale column to know how many units have sold. • Firstly, select cell D5.
• Secondly, write down the following formula.
`=IF(B5>=C5,"Yes","No")` • Then, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result. Read More: Excel IF Statement Between Two Numbers

### Example 2: Using IF Function for Text with Yes or No Statement in Excel

So, in this section, we will show how to make comments with yes or no statements in a sample data set of multiple products and their delivery status. • Firstly, select cell D5.
• Then, write down the following formula.
`=IF(C5="Delivered","Yes","No")` • Afterward, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result. ### Example 3: Employing IF Function for Specific Criteria with Yes or No Statement

Finally, in this section, we will demonstrate how to find a specific color with a yes or no statement in a sample data set of multiple colors with specific criteria. • Firstly, choose cell C5.
• Secondly, write down the following formula.
`=IF(B5="White","Yes","No")` • After that, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result. You may download the following Excel workbook for better understanding and practice it by yourself.

## Conclusion

In this article, we’ve covered 3 suitable examples of how to use the IF function with a yes or no statement in Excel. We sincerely hope you enjoyed and learned a lot from this article. If you have any questions, comments, or recommendations, kindly leave them in the comment section below.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems. Bishawajit Chakraborty

I'm Bishawajit Chakraborty. Hello. I graduated from Rajshahi University of Engineering & Technology (RUET) with a degree in Mechanical Engineering. I'm working with ExcelDemy as a Content Developer for Excel & VBA. You can visit our website, Exceldemy if you'd like to read my published articles on MS Excel and VBA.

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  