Excel IF statement: how to use it for 3 conditions

Learn how to use the Excel IF statement with multiple conditions and combine it with OR and/or AND functions!

We all know the classic IF statement in Microsoft Excel but how do you use it with multiple conditions?

Let start with a quick refresher regarding the IF function in Excel. This function includes 2 mandatory arguments and 1 optional (value_if_false).

The IF formula is: =IF(logical_test, value_if_true, [value_if_false]).

logical_test – the condition you want to test.
value_if_true – the returned value when the result of logical_test is TRUE.
value_if_false – the returned value when the result of logical_test is FALSE.

The IF function is one of many logical functions you can use in Excel; other logical functions are XOR, AND, OR, etc.

Read our tutorial to learn how to use the IF statement formula in Excel!

In this article, we’ll share plenty of examples of IF function for 1, 2 and 3 conditions. Ready to learn?

To use the IF function in Excel, simply follow the syntax =IF(logical_test, value_if_true, [value_if_false]).

Below are 2 examples using the IF formula:

We want to send a promotional code to customers who bought more than 5 times with us. The formula we use is =IF(B42>5,”Send promo code”,”No”).

Note that if you use text values in the IF formula, you need to wrap them with quotation marks (“”) except for FALSE or TRUE.

We want to send a promotional code to customers who did not order this year. The formula we use is =IF(B42=0,TRUE,FALSE).

We don’t need to wrap TRUE or FALSE within quotation marks but we do need to do it for other text values.

To use the IF function with multiple conditions, you can combine IF with AND or IF with OR.

In Excel, use the IF function with 2 conditions by adding AND or OR functions, for example, to it.

In this example, we want to send a promotional code to customers who made at least 1 purchase in Q1 or in Q2. We decide to combine Excel IF and OR statements.
As a reminder, the OR syntax is =OR(logical1, [logical2], …).

Here, only David did not purchase anything in Q1 or Q2.

If you want to use the IF function in Excel, combining 2 conditions, check how just below!

In this example, we want to send a promotional code to customers who made at least 1 purchase in Q1 and in Q2. We decide to combine Excel IF and AND statements.
As a reminder, the AND syntax is =AND(logical1, [logical2], …).

The AND statement is underlined in yellow.

To use the IF statement in MS Excel with more conditions, follow the same process. More examples, with 3 conditions this time, just below!

Combine the IF function with AND or OR, for example, to use it with multiple conditions. Learn how by checking the 3 examples below!

We want to find customers who made at least 1 purchase in Q1 and in Q2, and who are subscribers to our Youtube channel.

As a reminder, the AND syntax in Excel is =AND(logical1, [logical2], …).
The formula we use is =IF(AND(B42>0,C42>0,D42=TRUE),”Send a code”,”No”).

Note that text values have to be wrapped with quotation marks for the system to recognise the values. For TRUE or FALSE, you may not use quotation marks.

We want to send a promo code to customers who made at least 1 purchase in Q1 or in Q2, or who are subscribers to our Youtube channel.

As a reminder, in Excel the OR function syntax is =OR(logical1, [logical2], …).

All our customers meet at least 1 criteria.

Now, we want to send a promotional code to customers who made at least 1 purchase in Q1 or in Q2, and who are subscribers to our Youtube channel.

As a reminder, in Excel the OR function syntax is =OR(logical1, [logical2], …) and the AND syntax is =AND(logical1, [logical2], …).

We are combining the IF, OR and AND functions here. The formula we use is:

The IF function is highlighted in bold.
-Highlighted in yellow, find the OR formula.

-In grey is the AND function.
-We highlighted the combining elements between AND and OR statements in green.

Follow the same logic to use the IF function with more than 3 conditions.

Now, you know how to use Excel IF with 3 conditions!

Join our Excel Course today and add a new certificate to your CV and LinkedIn profile!

Advertising
Analytics

Categories

AllAdvertisingFormatsPlatformsKPI'sAd News
What is Programmatic Advertising?

What is Programmatic Advertising?

Understand what programmatic advertising is and how it works to increase your ROI and become a programmatic specialist.

Read More
Programmatic Advertising: What is a DSP?

What are DSPs?

A DSP is a great tool to use but what does DSP stand for in marketing? What are some Demand-Side Platforms examples? Today, we answer your questions!

Read More

Best DSPs for Programmatic Advertising

Ted Jordan shares his list of best DSPs for Programmatic Advertising so you don’t have to lose time searching the internet to find the right Demand-Side Platform for your campaigns.

Read More
Programmatic Advertising: What is a SSP?

Supply-Side Platforms (SSPs) Explained

SSPs basics in advertising: learn what Supply-Side Platforms are used for and who use them. Get familiar with more programmatic advertising technical terms.

Read More

What is O&O Advertising?

Discover one more important jargon term used in Programmatic Advertising: O&O advertising. Get familiar with O&O formats and advantages.

Read More
Programmatic: Pixels in Advertising 101

Advertising pixels: types, pros and best practices

Learn the basics of Programmatic Advertising with Ted Jordan! Today, we explain what a pixel is in advertising with simple words and expertise. Ready to learn?

Read More

Categories

AllFunctionsToolsShortcut Keys

How to change shapes in Excel column charts

Learn how to easily change the columns shape in your Excel charts so your colleagues and customers will remember your impacting graphs.

Read More

How to use the LEFT, RIGHT and MID functions

Learn how to extract text in Excel with the LEFT, RIGHT and MID functions. Plenty of examples to learn from and functions are explained with simple words. If you start...

Read More

Excel IF statement: how to use it for 3 conditions

Learn how to use the Excel IF statement with multiple conditions and combine it with OR and/or AND functions!

Read More
Navigating with Tab, Enter, and Shift Key on Excel.

How to move between cells when arrow keys are not working (Excel)

Learn how to move between Excel cells without using your mouse or arrow keys. Discover more shortcuts and tricks below!

Read More

How to use the IFERROR function (Excel + Google Sheets)

Discover how to use IFERROR in Excel or in Google Sheets in 4 easy steps! No more errors on your documents or dashboards with IFERROR.

Read More
Cope Paste Options on excel with shortcut keys

Copy paste values like a pro! (Excel+Google Sheets)

Copy and paste values (not formulas) using shortcut keys in Excel or Google Sheets! Learn how spreadsheets professionals do it within seconds and become one of them. Save time now...

Read More