Pinterest Pixel

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

John Michaloudis
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.


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:

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.

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


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  Top 10 Excel Productivity Tips

Steps To Follow

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

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