Excel tutorial on if condition. You can use it whenever you need to test a condition and take an action based on the result. If logicaltest valueiftrue valueiffalse. Excel if function syntax and usage the if function is one of logical functions that evaluates a certain condition and returns the value you specify if the condition is true and another value if the condition is false. This nifty formula in excel allows the user to specify a logical condition either numerical or textual and returns a value also specified by the user for whether the condition is met true or not met false.
For example take a look at the if function in cell b2 below. If the price is greater than 500 the if function returns high else it returns low. For example if sales total more than 5000 then return a yes for bonus otherwise return a no for bonus. The excel if statement tests a given condition and returns one value for a true result and another value for a false result.
The if function is a very flexible function.