![]() The most reasonable approach is using a zero-length string ("") to get a blank cell when the condition is not met: Typing a comma after the value_if_true argument will force Excel to return 0, which doesn't make much sense either: Quite unexpected, isn't it? Here is an example of such a formula: If there is just a closing bracket after value_if_true, the IF function will return the logical value FALSE. Omitting the 3 rd parameter of IF will produce the following results when the logical test evaluates to FALSE. The screenshot below demonstrates the difference: To return a blank cell instead, supply an empty string ("") for the second parameter, like this: there are two consecutive commas after the logical test), you'll get zero (0) when the condition is met, which makes no sense in most cases. If the 2 nd argument of your Excel IF formula is omitted (i.e. Though the last two parameters of the IF function are optional, your formula may produce unexpected results if you don't know the underlying logic. This formula will return "Good" if the value in A2 is greater than 80, a blank cell otherwise: ![]() In case you wish to return a value only when the condition is met (or not met), otherwise - nothing, then use an empty string ("") for the "undefined" argument. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |