This guide will discuss **how to create an IF function to return yes or no in Excel**.

##### Table of Contents

Since it has several built-in functions and tools, Excel is a popular for long calculations and complex data analysis. And one powerful built-in function in Excel is the `IF`

function.

So the `IF`

function allows us to evaluate our data set based on the condition we set and then return a value depending on the evaluation results. Furthermore, we can even customize the value we want to be returned depending on the results of the function.

Let’s take a sample scenario wherein we need to create an `IF`

function to return yes or no in Excel.

Suppose you are a teacher who is recording class attendance. And a student is considered present if they answered the test. Moreover, you want the results to return Yes or No instead of TRUE or FALSE.

To do this, you simply used the basic syntax of the `IF`

function and inputted the optional arguments to ensure the formula will return Yes when the evaluation is TRUE. Otherwise, the formula will return No when the evaluation is FALSE.

Before we continue on to a real example of creating an `IF`

function to return yes or no in Excel, let’s first learn the syntax of the `IF`

function.

**The Anatomy of the IF Function**

The syntax or the way we write the `IF`

function is as follows:

=IF(logical_test, [value_if_true], [value_if_false])

Let’s take apart this formula and understand what each term means:

**=**the equal sign is how we begin any function in Excel.**IF()**is our`IF`

function. And this function is used to check whether a condition is met. Then, it will return one value if TRUE and another value if FALSE.**logical_test**is the only required argument. So this refers to any value or expression that can be evaluated as TRUE or FALSE.**value_if_true**is an optional argument. And this refers to the value we want the function to return if the logical_test is TRUE. When omitted or left blank, TRUE is returned.**value_if_false**is another optional argument. So this refers to another value we want the function to return if the logical_test is FALSE. When omitted or left blank, FALSE is returned.

Great! Now we can move on and dive into a real example of creating an `IF`

function to return yes or no in Excel.

**A Real Example of Creating IF Function to Return Yes or No in Excel**

Let’s say we have a data set about the test scores of different students. And we have two columns containing the students’ names and test scores. So our initial data set would look like this:

We want to check whether each student passed the test. For the student to pass, they need to have a test score greater than or equal to 75. Furthermore, we want the formula to return “Yes” if the student passed the test. Otherwise, we want the formula to return “No” if the student did pass the test.

Luckily, it is really easy to do this with the `IF`

function. Given the basic syntax of the `IF`

function, we would usually only input the logical test since it is the only required argument. In this case, the `IF`

function would return TRUE or FALSE by default.

However, we can easily change the return value by inputting the necessary argument in the `IF`

function. To do this, we can simply input “Yes” and “No” after the logical test argument.

By doing this, the `IF`

function would return “Yes” when the logical test is TRUE. Otherwise, the function will return “No” when the logical test is FALSE.

In this example, the logical test will only be TRUE when the student has a test score greater than or equal to 75. Then, the function will return “Yes”. On the other hand, the logical test will only be FALSE when the student has a test score of less than 75. Then, the function will return “No”.

So our final data set would look like this:

You can make your own copy of the spreadsheet above using the link attached below.

Amazing! Now we can move on and explain how to create an `IF`

function to return yes or no in Excel.

**How to Create IF Function to Return Yes or No in Excel**

In this section, we will discuss the step-by-step process of how to create an `IF`

function to return yes or no in Excel. Furthermore, each step has detailed instructions and pictures to guide you along the process.

To apply this method to your work, you can simply follow the steps below.

1. Firstly, we will create a new column in the data set wherein we will place the results to indicate whether the student passed the test or not. Then, we can apply the `IF`

function to return a yes or no.

To do this, we will type in the formula “**=IF(C2>=75, “Yes”, “No”)**”. Lastly, we will press the **Enter **key to return the result.

2. Secondly, we will drag down the **Fill Handle** tool to copy and apply the formula to the other cells in the column.

3. And tada! We have successfully created an `IF`

function to return yes or no in Excel.

And that’s pretty much it! We have successfully discussed how to create an `IF`

function to return yes or no in Excel. Now you can go ahead and apply this method to your work whenever you need to have a returned result of yes or no from the IF function.

Are you interested in learning more about what Excel can do? You can now use the `IF`

function and the various other Microsoft Excel formulas available to create great worksheets that work for you. Make sure to subscribe to our newsletter to be the first to know about the latest guides and tutorials from us.