fbpx

Excel IF Statement Two Conditions

Share

Facebook
Twitter
LinkedIn

You want to check two conditions with Excel IF function? You’ve come to the right place.
IF is one of Excel’s most popular and versatile functions. But things get exciting when you start combining it with multiple conditions — especially using AND, OR, nested IFs, and even blending it with SUMIFS.

In this article, let me show you how to write IF formulas with a real-life example using a sales dataset, depicted below. Click here to download the data file.

Sample data - Excel IF Function with two conditions

Example 1: Excel IF Statement Two Conditions Using AND

Excel IF Function - Two Conditions - Example scenario

Scenario: You want to check if a sale happened in the North region and if the revenue is more than 2000.

=IF(AND(G4>2000, C4="North"), "Yes", "No")

What this does: If both conditions are true, it says “Yes”. If even one fails, you get “No”.

This is perfect for filtering VIP-level sales in specific territories.


Example 2: IF with Date Condition

IF and Date conditions in Excel

Scenario: You want to see if the salesperson is Bob and the sale happened before April 15, 2025.

=IF(AND(D4="Bob", B4<DATE(2025,4,15)), "Yes", "No")

? DATE(2025,4,15) ensures your comparison stays clean even if the actual cell has time info baked in.


Example 3: Bonus Calculation Using IF + Arithmetic

Using IF with two conditions in Excel to calculate bonus

Scenario: You want to calculate bonus:

  • If revenue > 3000 and units sold > 35 ? 5% bonus
  • Otherwise ? 3% bonus
=IF(AND(G4>3000, F4>35), 5%, 3%) * G4

This is a very common use-case: checking two values to decide payout level.


Example 4: Multiple OR Conditions Inside IF

Using AND + OR functions inside IF function - Complex example

Scenario: Approve if either region is North or South, and salesperson is either Alice or Bob.

=IF(AND(OR(C4="North", C4="South"), OR(D4="Alice", D4="Bob")), "YES", "NO")

? Combine AND and OR when you need multiple “paths” to approval.


Example 5: Categorizing Using Nested IFs and Between

Nested IF function example

Scenario: Label accounts based on revenue:

  • Over 4500 ? “Major Account”
  • Between 3000 and 4500 ? “Key Account”
  • Else ? “Normal Account”
=IF(G4>4500, "Major Account", IF(AND(G4>=3000, G4<=4500), "Key Account", "Normal Account"))

Nested IFs are a good fit when you have tiered logic like this.

[Learn how to write BETWEEN Condition in Excel]


Example 6: Day of Week Based Label

Nested IF with dates to figure out start, mid or end of week

Scenario: Label the day based on when the sale occurred:

  • Monday–Wednesday ? “Start of Week”
  • Thursday–Friday ? “Mid Week”
  • Weekend ? “Weekend”
=IF(WEEKDAY(B4,2)<=3, "Start of Week", IF(WEEKDAY(B4,2)<=5, "Mid Week", "Weekend"))

Note: WEEKDAY(date, 2) makes Monday = 1 and Sunday = 7.


Bonus: Beyond IF – Using Conditions in SUMIFS

IF is great when you’re checking one row at a time. But if you want to sum based on multiple filters, use SUMIFS.

SUMIFS Examples:

Total revenue from North region and Bob:

Combining IF and SUM to add up values that meet two criteria
=SUMIFS(G4:G33, C4:C33, "North", D4:D33, "Bob")

Units sold for Product A before or on April 20, 2025:

SUM IF with date conditions example
=SUMIFS(F4:F33, E4:E33, "Product A", B4:B33, "<=20-Apr-2025")

Revenue from South between April 10 and 25:

Dates between condition for SUMIFS - example
=SUMIFS(G4:G33, C4:C33, "South", B4:B33, ">=10-Apr-2025", B4:B33, "<=25-Apr-2025")

Highlight IF conditions are met

We can use Excel conditional formatting to highlight cells that meet one or more conditions. Here is a quick demo of how to highlight all revenue > 3000.

Highlight values that meet IF condition - excel example
  • Select the data you want to highlight
  • Go to Home > Conditional Formatting > and set up the rule based on the behavior you want. (For example, highlight cells -> Greater than is perfect for the above example)
  • Specify the input and format
  • Click ok to have the rule “dynamically applied” to your data
  • You can add more complex and multiple condition rules too. Refer to my conditional formatting basics page for a proper tutorial.

A Few More Handy Patterns

Here are a few more patterns you can experiment with:

Check for blank cells:

=IF(ISBLANK(D4), "Missing", "Present")

Combine IF with SEARCH (for partial matches):

=IF(ISNUMBER(SEARCH("Bob", D4)), "It's Bob", "Not Bob")

Complex multi-check with helper column idea:

Use a helper column like IsQualified that uses:

=IF(AND(G4>2500, F4>=25, C4="North"), "Qualified", "Nope")

Then you can filter or pivot based on IsQualified.


Final Thoughts

Combining IF with AND, OR, and nesting gives you powerful logic control — without writing code. Start with two conditions, then try combining patterns as shown here.

Want to go further? Try writing a formula that combines:

  • Multiple date checks
  • Region + product filters
  • Revenue thresholds

Let Excel do the thinking for you!

Additional Resources for you

Refer to below pages for more help on IF conditions with Excel.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

Leave a Reply