0

excel logo

Logical functions are some of the most popular and useful in Excel. They can test values in other cells and perform actions dependent upon the result of the test. This helps us to automate tasks in our spreadsheets.

How to Use the IF Function

The IF function is the main logical function in Excel and is, therefore, the one to understand first. It will appear numerous times throughout this article.

Let’s have a look at the structure of the IF function, and then see some examples of its use.

The IF function accepts 3 bits of information:

=IF(logical_test, [value_if_true], [value_if_false])
  • logical_test: This is the condition for the function to check.
  • value_if_true: The action to perform if the condition is met, or is true.
  • value_if_false: The action to perform if the condition is not met, or is false.

Comparison Operators to Use with Logical Functions

When performing the logical test with cell values, you need to be familiar with the comparison operators. You can see a breakdown of these in the table below.

Comparison operators for logical functions

Now let’s look at some examples of it in action.

IF Function Example 1: Text Values

In this example, we want to test if a cell is equal to a specific phrase. The IF function is not case-sensitive so does not take upper and lower case letters into account.

Read the remaining 66 paragraphs


Post a Comment Blogger

We welcome comments that add value to the discussion. We attempt to block comments that use offensive language or appear to be spam, and our editors frequently review the comments to ensure they are appropriate. As the comments are written and submitted by visitors of The Sheen Blog, they in no way represent the opinion of The Sheen Blog. Let's work together to keep the conversation civil.

 
Top