 Highlighted

# The if function is incomplete but still give True as result

See the attached file Question about the if function.xlsx

I do not understand that =if(25-23;True;False) result is

5 Replies
Highlighted

# Re: The if function is incomplete but still give True as result

Excel regards 0 as FALSE and any other number as TRUE.

Highlighted

# Re: The if function is incomplete but still give True as result

The syntax of IF is IF(condition; value_if_true; value_if_false)

The function will return value_if_true if condition evaluates to TRUE, but also if it evaluates to a non-zero number.

If will return value_if_false if condition evaluates to FALSE, but also if it evaluates to 0.

In your example, condition evaluates to 25-23 = 2. Since this is non-zero, value_if_true is returned. This is used to return the last name if D11 contains a space, and the value of D11 itself if it doesn't contain a space.

Highlighted

# Re: The if function is incomplete but still give True as result

``=25-23=0``