Filter by Categories
Select all
Budget
Business Statements
Calendars
Federal Income Tax
Gantt Chart
GST India
Health, Logs and Personal Trackers
Inventory
Investments
Invoice/ Bill
Maintenance
Payroll & HR
Project Reports & Timelines
Purchase Order/Requisition
Quotation
Rental Ledger
Risk Registers
Sales/ Marketing
SWOT Analysis
Timesheet/ Attendance
UAE VAT
UK VAT
Filter by File Types






Excel Logical Functions : IF

How to use IF Function in MS Excel

Introduction to IF Function

Logical functions in Excel are predefined formulas that evaluate a given condition or set of conditions and return a Boolean value (TRUE or FALSE) based on whether the condition is met or not. They are used to test the truth or falsehood of a statement or a condition, and to make decisions based on the result. In this blogpost, we will discuss about IF Function.

IF Function returns a value if the condition you specify is TRUE, else some other value. In simple words, the IF function can test a condition first and returns a value based on the result of that condition.

Download Sample File

Download SAMPLE FILE to work, practice and master the LOGICAL Functions in Excel.

Syntax of IF Function

IF(logical_test,value_if_true,value_if_false)

Arguments of IF Function

  • logical_test: The condition which you want to evaluate.
  • value_if_true: The value which you want to get if that condition is TRUE.
  • value_if_false: The value which you want to get if that condition is FALSE.

Notes

  • The maximum number of nested conditions you can perform is 64.
  • You can use comparison operators to evaluate a condition.

Example of IF Function in MS Excel

In the below example, we have used a comparison operator to evaluate different conditions.

  1. We have used a specific text to get in the result if the condition met or not.
  2. You can also use TRUE and FALSE to get in result.
  3. If you skip specifying a value to get the result if the condition is TRUE, it will return zero.
  4. And if you skip specifying a value to get the result if the condition is FALSE, it will return zero.

In the below example, we have used the IF function to create a nesting formula.

We have specified a condition and if that condition is false then we have used another IF to evaluate another condition and perform a task and if that condition is FALSE we have used another IF. In this way, we have used IF five times to create a nesting formula. You can use the same for more number of times for a nesting formula.

Other Excel Logical Functions Tutorials

You can explore and master other Logical functions in Microsoft Excel. Here is a complete list of Logical functions available in Microsoft Excel.

Content

Macro Codes in Excel

Learn Excel Quickly
Get full list of Excel Macro Codes