Pinterest Pixel

2 Best Ways to Use the IF ELSE Function in Excel (Examples)

In this article, we will be looking at how to use the IF ELSE function in Excel.... read more

Download Excel Workbook
John Michaloudis
Posted on

Steps To Follow

Overview

2 Best Ways to Use the IF ELSE Function in Excel (Examples) | MyExcelOnline 2 Best Ways to Use the IF ELSE Function in Excel (Examples) | MyExcelOnline


In this article, we will be looking at how to use the IF ELSE function in Excel. The IF ELSE function is used to test a condition. One value is returned if the condition is TRUE, and another if the condition is FALSE.

This function is most commonly used to automate decision-making processes in spreadsheets. We will explore the 2 ways to use this formula:

Let’s look at these methods thoroughly!

Download the Excel Workbook below to follow along and understand How to Use the IF ELSE Function in Microsoft Excel

download excel workbookIF-ELSE-function.xlsx

Single IF

In the example shown below, we have a list of boats and their respective lengths. In order to know whether you need flares, a fire extinguisher, a flashlight, etc. on board, you will need to know the boat’s classification.

To keep things simple, we will introduce 2 boat classifications:

See also  Highlight All Excel Formula Cells

Class A: Less than 16 ft.
Class 1: 16 ft. to less than 26 ft.

The IF function is returned like this:

=IF(test the condition, true result, false result)

How to Use the IF ELSE Function in Microsoft Excel
In this example, we need to test cells in column B to identify their classification.

The formula we will be using in cell C2 is:
=IF(B2<16,”Class A”,”Class 1”)

This means that if B2 is less than 16 feet, return it with Class A, otherwise, it would be Class 1.

Copy the same formula and apply it the rest of the rows by dragging it down.
How to Use the IF ELSE Function in Microsoft Excel

Multiple IFs

The previous example can easily classify the boats if there are only two conditions. But what if there are more than two classifications?

This is the complete list of classification for recreational boats in the US:

Class A: Less than 16 ft.
Class 1: 16 ft. to less than 26 ft.
Class 2: 26 ft. to less than 40 ft.
Class 3: 40 ft. to less than 65 ft.

See also  Evaluate Formulas Step By Step in Excel

The formula will look like this:

=IF(B2<16,”Class A”,IF(B2<26,”Class 1”,IF(B2<40,”Class 2”,IF(B2<65,”Class 3”))))
How to Use the IF ELSE Function in Microsoft Excel
Copy the formula from B2 to the rest of the rows by highlighting it and dragging down.

As you can see, once the formula is applied, the boats will automatically be identified in their respective classes.

There you have it! Hopefully, you can utilize this simple, but effective formula in your next project!

If you like this Excel tip, please share it
2 Best Ways to Use the IF ELSE Function in Excel (Examples) | MyExcelOnline 2 Best Ways to Use the IF ELSE Function in Excel (Examples) | MyExcelOnline

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...