How to use the IF function in Excel.

The IF function is a Logical function in Excel. In this article, we will learn how to use the IF function in Excel.

Logical functions in Excel test a condition, which can be an expression or a value. This condition evaluates to True or False. Based on the result (True or False), an action can be performed which can again be a value or an expression.

The IF Function

The IF evaluates a logical expression and displays one value if the condition is true and another value if the condition is false.

Syntax:

=IF (logical_test, value_if_True, value_if_false)

Where:

The logical_test is the condition that is tested to determine if it is true or false. If the condition is true, the function returns the value specified in the value_if_true argument; otherwise, it returns the value specified in the value_if_false argument.

The logical_test can perform tests on numbers or text values, making it a versatile and powerful function for decision-making in Excel.

Steps to use the IF function in Excel

Perform the following:

If Sales greater than 400 label them as “High”; otherwise, label them as Regular.

To explain this example, I will using the following data set,

On a blank column/cell, write the use the IF function as shown below:

=IF(A2>400, “High”,”Regular”)

where A2 is the cell reference of the first Sales value. A calculation in Excel always starts with “=”.

Press Enter on you keyboard to execute the formula.

After the first value is displayed correctly, drag it down to autofill the rest of the cells.

In plain English, the formula using the IF function, is performing the following:

IF A2 > 400 then display “High” else display it as “Regular”.

After writing the formula, the output you will get will be as below:

The IF function is one of the fundamental and widely used functions in Excel, and many users, from beginners to advanced, can benefit from learning how to use it effectively.

For a step-by-step approach to learning more advanced functions in Excel, take a look at the book Excel Basics to Advanced.

Read more blogs on Excel visit https://ohiocomputeracademy.com/category/msexcel/

About the Author

Chandraish Sinha has  20+ years of experience in Information Technology. He is an accomplished author and has published 11 books covering Business Intelligence related topics such as, Tableau, Power BI and Qlik. Checkout his Amazon Author profile.

His latest book Excel Basics to Advanced covers all the aspects of MS Excel and provides exercises for self-learning.

Similarly, his recent book, Dashboarding with Tableau, covers all the features in Tableau and includes exercises for self-learning.

He has implemented IT solutions in different domains viz. Pharmaceutical, Healthcare, Telecom, Financial and Retail.

He blogs regularly on various IT topics. Check them out in the links given below: 

Blogs

Learn Tableau

Learn All Bi

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.