

This formula goes to C2, and then is copied down through C7: For the detailed explanation, please see Excel IF: things to know.Īs an example, let's write a very simple IF formula that checks a value in cell A2 and returns "Good" if the value is greater than 80, "Bad" otherwise: Though this argument is optional, we recommend always configuring it to avoid unexpected results.

To create a simple If then statement in Excel, this is what you need to do: If omitted, the value_if_true argument must be set. Value_if_false (optional) - the value to return when the logical test evaluates to FALSE, i.e. If omitted, the value_if_false argument must be defined. Value_if_true (optional) - the value to return when the logical test evaluates to TRUE, i.e. Can be evaluated as either TRUE or FALSE. Logical_test (required) - the condition to test. IF(logical_test,, )Īs you see, IF takes a total of 3 arguments, but only the first one is obligatory, the other two are optional.

The syntax of the IF function is as follows: IF is one of logical functions that evaluates a certain condition and returns one value if the condition is TRUE, and another value if the condition is FALSE.
#If then formula excel to show blank cell how to#
How to use IF function in Excel - formula examples.In this tutorial, we are going to learn the syntax and common usages of the Excel IF function, and then take a closer look at formula examples that will hopefully prove helpful to both beginners and experienced users. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. IF is one of the most popular and useful functions in Excel. In this article, you will learn how to build an Excel IF statement for different types of values as well as how to create multiple IF statements.
