Skip to main content

Lesson 3.6 – Logical Functions (IF, AND, OR)

Lesson 3.6 – Logical Functions (IF, AND, OR)

Logical functions allow Excel to make decisions based on conditions. They are essential for building dynamic spreadsheets, validating data, and creating automated calculations. In questa lezione impari tre funzioni fondamentali: IF, AND e OR.


1. IF – Make Decisions

IF checks a condition and returns one value if the condition is true and another value if it is false.

Syntax:

=IF(condition, value_if_true, value_if_false)

Example:

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

IF is used for grading, approvals, thresholds, flags, and conditional labels.


2. AND – Check Multiple Conditions

AND returns TRUE only if all conditions are true.

Syntax:

=AND(condition1, condition2, ...)

Example:

=AND(A2 >= 50, B2 >= 50)

AND is useful for combined requirements, such as minimum scores or multi-step validations.


3. OR – Check Alternative Conditions

OR returns TRUE if at least one condition is true.

Syntax:

=OR(condition1, condition2, ...)

Example:

=OR(A2 = "Yes", B2 = "Yes")

OR is ideal when multiple acceptable options exist.


4. Combining IF with AND/OR

You can combine logical functions to create powerful conditions.

Example with AND:

=IF(AND(A2 >= 50, B2 >= 50), "Approved", "Rejected")

Example with OR:

=IF(OR(A2 = "Gold", A2 = "Silver"), "Priority", "Standard")

These combinations are widely used in business rules and data validation.


5. Practical Example

Suppose you manage a list of students with two exam scores:

  • Score 1 in column A
  • Score 2 in column B

Rules:

  • Pass if both scores ≥ 60
  • Borderline if at least one score ≥ 60
  • Fail otherwise

Formulas:

Pass:

=IF(AND(A2>=60, B2>=60), "Pass", "")

Borderline:

=IF(OR(A2>=60, B2>=60), "Borderline", "")

Fail:

=IF(AND(A2<60, B2<60), "Fail", "")

6. Common Mistakes to Avoid

  • Using text without quotation marks ("Yes")
  • Confusing AND with OR
  • Forgetting that IF needs three arguments
  • Using commas instead of colons in ranges

7. Practical Exercise

Practice logical functions with the following steps:

  1. Create a worksheet named Lesson_3_6_Practice.
  2. Enter two numeric columns (A and B).
  3. Use IF to label values above 100 as “High”.
  4. Use AND to check if both values exceed 50.
  5. Use OR to check if at least one value is zero.
  6. Combine IF + AND to create a pass/fail rule.

Internal Links


Next Lesson

Module 4 – Working with Tables

Comments

Popular posts from this blog

Alfred Marshall – The Father of Modern Microeconomics

  Welcome back to the blog! Today we explore the life and legacy of Alfred Marshall (1842–1924) , the British economist who laid the foundations of modern microeconomics . His landmark book, Principles of Economics (1890), introduced core concepts like supply and demand , elasticity , and market equilibrium — ideas that continue to shape how we understand economics today. Who Was Alfred Marshall? Alfred Marshall was a professor at the University of Cambridge and a key figure in the development of neoclassical economics . He believed economics should be rigorous, mathematical, and practical , focusing on real-world issues like prices, wages, and consumer behavior. Marshall also emphasized that economics is ultimately about improving human well-being. Key Contributions 1. Supply and Demand Analysis Marshall was the first to clearly present supply and demand as intersecting curves on a graph. He showed how prices are determined by both what consumers are willing to pay (dem...

Unlocking South America's Data Potential: Trends, Challenges, and Strategic Opportunities for 2025

  Introduction South America is entering a pivotal phase in its digital and economic transformation. With countries like Brazil, Mexico, and Argentina investing heavily in data infrastructure, analytics, and digital governance, the region presents both challenges and opportunities for professionals working in Business Intelligence (BI), Data Analysis, and IT Project Management. This post explores the key data trends shaping South America in 2025, backed by insights from the World Bank, OECD, and Statista. It’s designed for analysts, project managers, and decision-makers who want to understand the region’s evolving landscape and how to position themselves for impact. 1. Economic Outlook: A Region in Transition According to the World Bank’s Global Economic Prospects 2025 , Latin America is expected to experience slower growth compared to global averages, with GDP expansion constrained by trade tensions and policy uncertainty. Brazil and Mexico remain the largest economies, with proj...

Fundamental Analysis Case Study NVIDIA

  Executive summary NVIDIA is analyzed here using the full fundamental framework: balance sheet, income statement, cash flow statement, valuation multiples, sector comparison, sensitivity scenarios, and investment checklist. The company shows exceptional profitability, strong cash generation, conservative liquidity and net cash, and premium valuation multiples justified only if high growth and margin profiles persist. Key investment considerations are growth sustainability in data center and AI, margin durability, geopolitical and supply risks, and valuation sensitivity to execution. The detailed numerical work below uses the exact metrics you provided. Company profile and market context Business model and market position Company NVIDIA Corporation, leader in GPUs, AI accelerators, and related software platforms. Core revenue streams : data center GPUs and systems, gaming GPUs, professional visualization, automotive, software and services. Strategic advantage : GPU architecture, C...