Let Excel make decisions for you

In Microsoft Excel, the logical tests of the IF function are your tool to check if a statement is TRUE or FALSE and return results accordingly.

IF categorises sales, flags overdue tasks, or passes/fails students. It brings some logical thinking to your spreadsheet.


🔍 What is the IF function?

The IF function tests the given condition and produces one value if TRUE and a different value if FALSE.

Basic syntax:

=IF(logical_test, value_if_true, value_if_false)

For Example:

=IF(A2>=60, "Pass", "Fail")

This means, if the value in cell A2 is 60 or higher, then consider it "Pass"; else, values lower than 60 get tagged as "Fail".


Example (with detailed steps): Categorising Sales

Sales 
($)
Category
1500
High
500
Low

Formula:

=IF(A2>1000, "High", "Low")

This helps Excel label items based on a given threshold.


Nested IF Statements

For double conditions:

=IF(A2>1000, "High", IF(A2>500, "Medium", "Low"))

This classifies sales into three categories.


IF + AND/OR

=IF(AND(A2>1000, B2="Yes"), "Bonus", "No Bonus")

This gives a bonus only if both conditions are met.

=IF(OR(A2="Yes", B2="Yes"), "Proceed", "Hold")

This way, one condition is enough to trigger the "proceed" outcome.


✅ Best Practices for IF Statements

- Be cautious with nested IFs so that they are clear 

- When penalising numerous conditions, combine with AND/OR

- Try working on a small range first before using it across a large advancement

- Consider using IFS function in Microsoft Excel 365/2021 for simpler multi-logic


🎓 Learn More with Other Levels

Take your Excel skills to the next level:


✍️ Other Articles, Tips & Tricks you would like:


Work Faster, Smarter, Productively and Efficiently with Other Levels Dashboard Template

أحدث القصص

عرض الكل

Import CSV and TXT File in Microsoft Excel (The Right way)

Learn how to import files using Microsoft Excel's Power Query, maintain clean structure, auto-refresh reports and create powerful dashboards with zero errors. Ideal for data professionals, analysts and business users!

إقرأ المزيد

Manage Complex Spreadsheets in Microsoft Excel with Custom Views

Microsoft Excel's Custom Views let you save time and instantly switch between tailored worksheet layouts. Perfect for dashboards, monthly reports, filtered datasets, print-ready views, or team-specific presentations. 

إقرأ المزيد

Learn Advanced Data Manipulation in Microsoft Excel

Unlock full potential of Microsoft Excel with the OFFSET Function. Learn how to automate your spreadsheets and create interactive, scalable and smart Excel reports.

إقرأ المزيد