Using IF Function in MS Excel.
Hello friends, this time we will discuss a basic function of MS Excel on the IF function which is a function of the worksheet. The function that we discuss here is frequently used by MS Excel users especially to return a value or make a decision. IF Function returns a value by evaluating a situation where the state is evaluated as TRUE state, or based on other circumstances that are evaluated as FALSE state.
Syntax.
This is general syntax for the MS Excel IF function.
IF(logical_test, [value_if_true], [value_if_false])
- logical_test : a condition of a cell that you want to test.
- value_if_true : a value that returned if a condition evaluated to TRUE.
- value_if_false : a value that returned if a condition evaluated to FALSE.
Example.
Let's try to apply the MS Excel IF function to the worksheet.
We will try to create a condition where a cell returned a value if its value >=0.
Based on the spreadsheet above,
If cell A1 greater than or equal to 0 (zero), the C1 cell returns as "a Positive Number" if its TRUE, or "a Negative Number" if FALSE.
=IF(A1>=0,"a Positive Number","a Negative Number")
If we fill A1 cell with a number that less than 0 (zero), the condition identified as FALSE. C1 cell returns the value "a Negative Number".
Or if we fill A1 cell with a number that greater than or equal to 0 (zero), the condition identified as TRUE. C1 cell returns the value "a Positive Number".
Other Example.
Based on the spreadsheet above,
=IF(C1=A1+B1,A3,A4)
If C1 cell equals to A1 cell plus A2 cell, the D1 cell returns value of cell A3. Or if that condition does not match, the D1 cell returns value of cell A4.
0 Komentar untuk "Using IF Function in MS Excel"