MS Excel VBA

How to use IF Formula

How to use IF Formula

How IF function work?


The MS Excel IF Statement test a given condition base  and returns one value for a TRUE From result and another for a FALSE result. If sales total an additional $5000, return a “ Yes ” for extra – other, replace a “ No ” for the tip. We can also apply the Excel IF function to estimate a single function or contain several IF functions in one formula. More Complex IF statements in Excel are known as nested IF statements.

IF Function in Excel

 

1. Purpose
Trial for a special condition
2. Return Value
The values you supply for TRUE or FALSE
3. Syntax
= IF(logical test,(value if true),(value if false))
Arguments
- A worth or valid statement can be estimated as TRUE or FALSE.
value if true-( voluntary) The value to return when the logical test evaluates to TRUE.
-( voluntary) The worth to replace when logical test evaluates to FALSE
Pass or Fail Case

In the worksheet displayed above, we need to assign either a” Pass” or” Fail” based on a test score. A fleeting score is 80 or high. The formula in D6 duplicated down, is

=IF(C5>=80,"Pass","Fail")
Example 1 – Excel IF Statement

Merchandisers constantly give a reduction grounded on the volume boughtguess we’re given the following data:

Using many IF functions, we can produce a formula to check multiple conditions and make other computations depending on what volume rank the specified amount falls in. To calculate the total price for 100 particulars, the formula will be:

The result below:

Remembers things about the IF Function
  • The Excel IF function will work if the logical test returns a numeric worth. In such a case, any non-zero value is treated as TRUE and zero is acted as FALSE
  • !# error _ Occurs when the given logical test argument can not be estimated as TRUE or FALSE.
  • When arguments are handed to the function as arrays, the IF function will estimate every element of the array.
  • Still, we should use the COUNTIF and COUNTIFS functions, If we wish to count conditions.
  • Still, we should use the SUMIF and SUMIFS functions, If we wish to add up conditions.
    Reasons to use an Excel IF Statement.
  • There are numerous reasons why a critic or anyone who uses Excel would want to make IF formulas.
Common exemplifications include:
  • To test if an argument is true or false
  • To affair a NUMBER
  • To affair some textbook
  • To induce a tentative formula(e.g., the result is C3 B4 if true and N9- E5 if false)
  • To produce scripts to be used in fiscal modeling.
  • To calculate a debt schedule or a fixed asset deprecation schedule in counting.
The IF function isn’t case-sensitive.
  • To count values conditionally, using the COUNTIF or the COUNTIFS functions.
  • To add values conditionally, use the SUMIF or the SUMIFS functions.
  • Still, the Excel IF function will estimate every element of the array, If any of the arguments to IF Function  are supplied as arrays.

Learn Complete Microsoft Excel Tutorial

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top