Advanced Excel
  • Introduction to Excel
  • Security
  • Short Keys
  • Practice Data Sheets
  • Data Formats
  • Conditional Formatting
  • Format as Table
  • Data Sorting
  • Data Filtering
  • Remove Duplicates
  • Data Validation
  • Text-To-Columns
  • Data Consolidation
  • What-if-Analysis
  • Grouping
  • Absolute & Relative Referencing
  • Mathematical Functions - Sum, Sumif, Sumifs, Count, Counta, Countif, Max, Min, Average
  • Task1 - Mathematical Formulas
  • Logical Functions - IF, IFERROR, AND, OR
  • Date Time Functions - Date, Year, Month, Day, Time, Hour, Minute, Second, Today, Now, Datedif
  • Text Functions - Proper, Left, Right, Concatenate, Exact, Find, Search, Mid, Replace, Text, Replace
  • Vlookup Formula
  • Task2 - Vlookup Problems
  • Vlookup with Match Formula - Dynamic Duo
  • Vlookup using (*) example
  • Vlookup with Running Countif
  • Task3 - Vlookup, Running Countif Problem
  • Lookup Functions - Hlookup, Index Match
  • Lookup Functions - Indirect, Offset
  • Vlookup-Indirect Example
  • Sumif, Indirect, Offset, Match Example
  • Array Functions
  • Task4 - Array Problem
  • Advanced Conditional Formatting using Formula
  • Data Validation using Indirect Function
  • Charts, Waterfall Graph
  • Pivot Table, Dashboards
Powered by GitBook
On this page

Was this helpful?

Logical Functions - IF, IFERROR, AND, OR

What is a Logical Function?

It is a feature that allows us to introduce decision-making when executing formulas and functions. Functions are used to;

  • Check if a condition is true or false

  • Combine multiple conditions together

What is a condition and why does it matter?

A condition is an expression that either evaluates to true or false. The expression could be a function that determines if the value entered in a cell is of numeric or text data type, if a value is greater than, equal to or less than a specified value, etc.

IF

The IF function can perform a logical test and return one value for a TRUE result, and another for a FALSE result. For example, to "pass" scores above 70: =IF(A1>70,"Pass","Fail"). More than one condition can be tested by nesting IF functions. The IF function can be combined with logical functions like AND and OR.

=IF(logical_test, [value_if_true], [value_if_false])

IFERROR

Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula. Use the IFERROR function to trap and handle errors in a formula.

=IFERROR(value, value_if_error)

AND

The AND function is a logical function used to require more than one condition at the same time. AND returns either TRUE or FALSE. To test if a number in A1 is greater than zero and less than 10, use =AND(A1>0,A1<10). The AND function can be used as the logical test inside the IF function to avoid extra nested IFs, and can be combined with the OR function.

=AND(logical1, [logical2], ...)

OR

The OR function is a logical function to test multiple conditions at the same time. OR returns either TRUE or FALSE. For example, to test A1 for either "x" or "y", use =OR(A1="x",A1="y"). The OR function can be used as the logical test inside the IF function to avoid extra nested IFs, and can be combined with the AND function.

=OR(logical1, [logical2], ...)

PreviousTask1 - Mathematical FormulasNextDate Time Functions - Date, Year, Month, Day, Time, Hour, Minute, Second, Today, Now, Datedif

Last updated 6 years ago

Was this helpful?

12KB
IFERROR.xlsx
Iferror Formula Example Sheet
13KB
Logical Functions - IF, AND, OR.xlsx
If, AND, OR Example sheet