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.


Download Practice Workbook

You may download the following Excel workbook for better understanding and practice it by yourself.


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

Syntax for IF Function

=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.

Sample Data Set for Applying IF Function for Numbers in Excel

  • Firstly, select cell D5.
  • Secondly, write down the following formula.
=IF(B5>=C5,"Yes","No")

Showing Results for Applying Excel IF Function for Numbers with Yes or No Statement

  • Then, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result.

Showing Results for Applying Excel IF Function for Numbers with Yes or No Statement

Read More: Excel IF Statement Between Two Numbers (4 Ideal Examples)


Similar Readings


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.

Sample Data Set for Using IF Function for Text in Excel

  • Firstly, select cell D5.
  • Then, write down the following formula.
=IF(C5="Delivered","Yes","No")

Using Excel IF Function for Text with Yes or No Statement

  • Afterward, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result.

Showing Result for Using Excel IF Function for Text with Yes or No Statement

Read More: How to Check If Cell Contains One of Several Values in Excel


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.

Sample Data Set for Employing IF Function for Specific Criteria

  • Firstly, choose cell C5.
  • Secondly, write down the following formula.
=IF(B5="White","Yes","No")

Employing Excel IF Function for Specific Criteria

  • After that, press Enter and use the Fill Handle to drag rightward to the remaining cells to see the result.

Showing Final Results

Read More: How to Use If Statement Based on Cell Color in Excel (3 Examples)


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. Additionally, if you want to read more articles on Excel, you may visit our website, Exceldemy. If you have any questions, comments, or recommendations, kindly leave them in the comment section below.


Related Articles

Bishawajit Chakraborty

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

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo