Skip to main content

IF Function

​How to Use IF Function Formula in Excel

Excel IF function Formula

IF function Formula is one of the Excel's logical function Formula that evaluates a certain condition and returns the value you specify if the condition is TRUE, and another value if the condition is FALSE.

The syntax for Excel IF Function Formula is as follows:

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

As you see, the IF function has 3 arguments, but only the first one is obligatory, the other two are optional.


Some List of Example :

​Example : 1


* logical_test - a value or logical expression that can be either TRUE or FALSE. Required.In this argument, you can specify a text value, date, number, or any comparison operator. For example, your logical test can be expressed as or A1="Yes", A1<200, A1=5000 or A1>500.

* value_if_true - the value to return when the logical test evaluates to TRUE, i.e. if the condition is met. Optional.For example, the following formula will return the text "Yes" if a value in cell A1 is greater than 5000: =IF(A1>5000, "Yes")

* value_if_false - the value to be returned if the logical test evaluates to FALSE, i.e. if the condition is not met. Optional.For example, if you add "No" as the third parameter to the above formula, it will return the text "Yes" if a value in cell A1 is greater than 5000, otherwise, it will return "No": =IF(A1>5000, "Yes", "No")

Here the Below Screenshot Image




Example : 2

* logical_test - a value or logical expression that can be either TRUE or FALSE. Required.In this argument, you can specify a text value, date, number, or any comparison operator. For example, your logical test can be expressed as or  A1=5000, B1=5000 

* value_if_true - the value to return when the logical test evaluates to TRUE, i.e. if the condition is met. Optional.For example, the following formula will return the text "TRUE" if a value in cell A1 And B1 Equal  5000: =IF(A1=B1,"TRUE","FALSE")

* value_if_false - the value to be returned if the logical test evaluates to FALSE, i.e. if the condition is not met. Optional.For example, if you add "FALSE as the third parameter to the above formula, it will return the text "TRUE" if a value in cell A1 And B1 Equal  5000, otherwise, it will return "FALSE": =IF(A1=B1,"TRUE","FALSE")

Here the Below Screenshot Image



Example : 3

* logical_test - a value or logical expression that can be either TRUE or FALSE. Required.In this argument, you can specify a text value, date, number, or any comparison operator. For example, your logical test can be expressed as or  A1=Saree, A2=Saree Blouse

value_if_Without Blouse Piece - the value to return when the logical test evaluates to Without Blouse Piece, i.e. if the condition is met. Optional.For example, the following formula will return the text "Without Blouse Piece" if a value in cell A1 is Saree: ==IF(A1="Saree Blouse","With Blouse Piece",IF(A1="Saree","Without Blouse Piece"))

value_if_With Blouse Piece - the value to return when the logical test evaluates to With Blouse Piece, i.e. if the condition is met. Optional.For example, the following formula will return the text "With Blouse Piece" if a value in cell A1 is Saree Blouse :=IF(A1="Saree Blouse","With Blouse Piece",IF(A1="Saree","Without Blouse Piece"))


Here the Below Screenshot Image


​ 

 

Combining the IF function Formula with Other Logical Functions Formula


 need to specify more complex conditions when writing your formula in Excel. You can combine the IF function Formula  with other logical functions Formula such as AND, OR, etc. Let's explore this further.

Combining the IF Function With AND function Formula

The IF function can be combined with the AND function Formula to allow you to test for multiple conditions. When using the AND function Formula, all conditions within the AND function Formula must be TRUE for the condition to be met. This Function Formula comes in very handy in Excel formulas.

Here the Below Screenshot : 1

 

IF((AND Formula 1 is ​=IF(AND(A2>="Saree",B2>40000), "Party", "Casual)



Here the Below Screenshot : 2

 

IF((AND Formula 2 is ​=IF(AND(B2>=25000,B2<=50000), "Great", "Average")



Combining the IF Function With OR function Formula : - 

The IF function Formula can be combined with the OR function Formula to allow you to test for multiple conditions. But in this case, only one or more of the conditions within the OR function needs to be TRUE for the condition to be met.

Here the Below Screenshot : 1

 
IF(OR Formula 1 is =IF(OR(A2="Saree",A2="Dress Material"), "Ethnic Wear", "Western Wear")



Here the Below Screenshot : 2

​​

IF(OR Formula 2 is ​==IF(OR(A2="Saree",B2>=5000), 999, "N/A")​

 

 

Comments

Post a Comment

Popular posts from this blog

Discount Formula in Excel

  Discount Formula in Excel To Discount Formula   an original price minus 5 is the same as Calculate to 95 of that value so if you have the Product Price (4585) in A2 use the Discount Formula Here the Below Example for Discount Formulas : -   5% Discount formula is =A2*0.95 10% Discount formula is =A2*0.90 15% Discount formula is =A2*0.85 20% Discount formula is =A2*0.80 25% Discount formula is =A2*0.75 30% Discount formula is =A2*0.70 40% Discount formula is =A2*0.60 50% Discount formula is =A2*0.50 Another Way to Calculate Discount Formula in Excel How to Find Discounted Amount in Excel Column A is Product Price, Column B is Discount Percentage, Column C is Discounted Amount and Column D is After Discount Amount     Discounted Amount Formula is  =A2*5%   After Discount Amount Formula is =A2-C2 Another Easiest Way to Calculate Discount F ormula  Col umn A is Product Pr ice, Col umn B is Discount Percentage % and C is After Discount

IFERROR With VLOOKUP And LEN AND LENB FUNCTION

Combining the IFERROR Function Formula with Logical VLOOKUP Functions Formula IFERROR Function With VLOOKUP Function Formula Description : -  Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula. Use the IFERROR Function With VLOOKUP function to trap and handle errors in a formula Below Following Values if Error : - #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL! For Example A                          B                    C                         D Description         Value          Description       Value Lookup Product               #N/A            Product                0 Product Details   #VALUE!      Sale5                   0 Item                    #REF!            Sale                     0 Sale                   #N/A             Item                      0 Sales                 #DIV/0!          Name                   0 Name                 #NAME?       Num                     0 Num                  #NUM!      

VLOOKUP Function

How to Use VLOOKUP Function Formula in Excel VLOOKUP Function Formula is one of the lookup and reference functions, when you need to find things in a table or a range by row. For example, look up an Product Quantity, Product Details or Product SKU, find any phone number by looking up Their last name (just like a telephone book Directory). The secret to VLOOKUP Function Formula  is to organize your data so that the value you look up (Product Quantity) is to the left of the return value you want to find (Product Quantity's).    VLOOKUP Function Formula Syntax : -  =VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup]) For Example : -      Argument name                      Description lookup_value     (required)         Which value you want to look up. Which value you want to look up must be in the first column of the range of cells you specify in   table-array    (Lookup Value is C)   For example, if   table-array   spans cells A:B, then your lookup_value