Logical Functions | Excel Tutorial - Learn with VOKS
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL
Back Next

Logical Functions

Learn this topic step-by-step with VOKS Tutorials.

Logical functions help Excel make decisions.

Think of them like asking a question:

"If this condition is true, do this. Otherwise, do something else."

1️⃣ What Are Logical Functions?

Logical functions test whether something is:

  • TRUE
  • FALSE

They are used when you want Excel to:

  • Compare numbers
  • Apply conditions
  • Automate decisions
  • Categorize data

2️⃣ The IF Function (Most Important Logical Function)

🔹 What IF Does

It checks a condition and returns one value if TRUE and another if FALSE.

🔹 Syntax

=IF(logical_test, value_if_true, value_if_false)

🔹 Example 1: Pass or Fail

Dataset

| Student | Score |
|---------|-------|
| John    | 75    |
| Mary    | 45    |
| David   | 60    |
| Anna    | 30    |

Rule:

  • Score ≥ 50 → Pass
  • Score < 50 → Fail

Formula:

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

Result

| Student | Score | Result |
|---------|-------|--------|
| John    | 75    | Pass   |
| Mary    | 45    | Fail   |
| David   | 60    | Pass   |
| Anna    | 30    | Fail   |

3️⃣ Logical Operators (Used Inside IF)

| Operator | Meaning               |
|----------|-----------------------|
|    =     | Equal to              |
|    >     | Greater than          |
|    <     | Less than             | 
|   >=     | Greater than or equal | 
|   <=     | Less than or equal    | 
|   <>     | Not equal             | 

4️⃣ Nested IF (Multiple Conditions)

Sometimes you need more than two outcomes.

Example: Grading System

Rules:

  • ≥ 80 → Distinction
  • ≥ 50 → Pass
  • < 50 → Fail

Dataset

| Student | Score |
|---------|-------|
| John    | 85    |
| Mary    | 67    |
| David   | 45    |
| Anna    | 92    |

Formula:

=IF(B2>=80,"Distinction",IF(B2>=50,"Pass","Fail"))

Result

| Student | Score | Grade       |
|---------|-------|-------------|
| John    | 85    | Distinction |
| Mary    | 67    | Pass        |
| David   | 45    | Fail        |
| Anna    | 92    | Distinction |

5️⃣ AND Function

🔹 What It Does

Returns TRUE only if ALL conditions are true.

🔹 Syntax

=AND(condition1, condition2, ...)

🔹 Example

Rule:

  • Pass only if Score ≥ 50 AND Attendance ≥ 75%

Dataset

| Student | Score | Attendance |
|---------|-------|------------|
| John    | 75    | 80%        |
| Mary    | 60    | 60%        |
| David   | 45    | 90%        |
| Anna    | 85    | 95%        |

Formula

=IF(AND(B2>=50,C2>=75),"Pass","Fail")

Result

| Student | Score | Attendance | Result |
|---------|-------|------------|--------|
| John    | 75    | 80%        | Pass   |
| Mary    | 60    | 60%        | Fail   |
| David   | 45    | 90%        | Fail   |
| Anna    | 85    | 95%        | Pass   |

6️⃣ OR Function

🔹 What It Does

Returns TRUE if at least one condition is true.

🔹 Syntax

=OR(condition1, condition2, ...)

Example

Rule:

  • Bonus if Sales ≥ 8000 OR Experience ≥ 5 years
=IF(OR(B2>=8000,C2>=5),"Bonus","No Bonus")

7️⃣ NOT Function

🔹 What It Does

Reverses TRUE/FALSE.

If TRUE → FALSE

If FALSE → TRUE

=NOT(A2>50)

8️⃣ TRUE and FALSE Functions

Excel has built-in logical values:

=TRUE()
=FALSE()

Usually used in advanced formulas.

9️⃣ Real Business Example

Sales Performance

| Employee | Sales | Target |
|----------|-------|--------|
| John     | 9000  | 8000   |
| Mary     | 7000  | 8000   |
| David    | 8500  | 8000   |
| Anna     | 6000  | 8000   |

Formula

=IF(B2>=C2,"Target Met","Target Not Met")

Result

| Employee | Sales | Target | Status          |
|----------|-------|--------|----------------|
| John     | 9000  | 8000   | Target Met     |
| Mary     | 7000  | 8000   | Target Not Met |
| David    | 8500  | 8000   | Target Met     |
| Anna     | 6000  | 8000   | Target Not Met |

🔟 Why Logical Functions Are Important

They allow you to:

  • Categorize data
  • Create grading systems
  • Evaluate performance
  • Apply business rules
  • Automate decisions

Without logical functions, Excel would only calculate — not decide.

QUICK KNOWLEDGE CHECK

Test Your Understanding

Answer 5 questions generated from this lesson. Your result is calculated instantly and is not saved.

0 / 5 answered
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL
Course contents
Excel
01 Introduction 02 Setting Up Your Environment 03 Navigating the Worksheet Environment 04 Data Trimming, Sorting and Filtering Tables, Nesting Functions 05 Understanding and Classifying Data Types, Changing to Text and Rounding Values 06 Cleaning the data, Joining text strings, Capitalizing words, Using upper and lower case, Extracting text from cells, Counting characters, Extracting text, Replacing characters 07 Preparing date data, Finding days of the week, Finding the matching column 08 Using Vlookup, Hlookup, Index, Pivot tables and case studies 09 Using count, Counta, Countblank, Count if functions 10 Math Functions in Excel 11 Using Minimum, Maximum, Averages to aggregate data 12 Logical Functions 13 Conditional Aggregation Using the IF Function 14 Getting Familiar with Different Visuals Available in Excel and When to Use Them 15 Analyzing Data with Line and Area Charts 16 Analyzing Data with Stacked Area Chart and 100% Stacked Chart 17 Building a Dashboard in Excel