IF Function


Purpose of the Function

The IF function can perform a logical test and return one value for a TRUE result, and another for a FALSE result.

Syntax

=IF (logical_test, [value_if_true], [value_if_false])

  • logical_test : This is the condition that you want to test. It can be any logical expression that evaluates to TRUE or FALSE.
  • value_if_true : The value to return if the logical_test evaluates to TRUE.
  • value_if_false : The value to return if the logical_test evaluates to FALSE.

Practical Example – Question




Question : If the Customer's Total Amount more than 5000, it is eligible for discount. therefore, find out the List Of Customers who are eligible for discount by using IF function?

Practical Example – Answer


Step -01 : Call IF Function :

Select the Cell, Which You Want to Apply the Function and Write IF Function =IF in Selected Cell.



Step -02 : Enter IF Arguments :

We need to pass Argument within the Brackets After Writing the IF Function there are three Arguments We need to Enter, those are Logical test, Value if true, value if false.

Logical test - we need to entre evaluating value, in this example If the Total Amount more than 5000 those Customers are eligible others are not eligible so Logical test should be (Each Customer's Total Amount Cell >5000)

Value if true - we need to entre evaluating value if true, in this example we are going to be put "ELIGIBLE"

Value if false - we need to entre evaluating value if false, in this example we are going to be put "NOT ELIGIBLE"



Step -03 : Hit The Enter Key :

After Entering the Function, we need hit The Enter Key, The Excel testing the argument. Then, it will show the result if the value true it will show ELIGIBLE, if it is false, it will show "NOT ELIGIBLE".



Step -04 : Drag Or Double Click in the Plus Sign (+) :

If You Drag Your mouse In the Bottom of Right Corner D2 Cell. You Are Able to See Plus Sign (+), If you Double Click in The Plus Sign (+) The Excel Automatically testing the argument then will show the result. if the value true, it will show ELIGIBLE, if it false it will show "NOT ELIGIBLE". OR Click on Plus Sign (+) And Drag Up to LastCell.



The IF function allows you to make decisions based on conditions in Excel spreadsheets. It's commonly used for conditional formatting, calculations based on specific conditions, or displaying different results based on varying criteria within the data.