Skip to main content

If Formula in excel by@yogendra5575

#IF Statements-

Formula: =IF(logical_statement, return this if logical statement is true, return this if logical statement is false)
When you’re doing an analysis of a lot of data in Excel there are a lot of scenarios you could be trying to discover and the data has to react differently based on a different situation.
Continuing with the sales example: Let’s say a salesperson has a quota to meet. You used VLOOKUP to put the revenue next to the name. Now you can use an IF statement that says: “IF the salesperson met their quota, say “Met quota”, if not say “Did not meet quota” (Tip: saying it in a statement like this can make it a lot easier to create the formula, especially when you get to more complicated things like Nested IF Statements in Excel).
It would look like this:
In the example with the VLOOKUP we had the revenue in column B and the person’s name in column C (brought in with the VLOOKUP). We could put their quota in column D and then we’d put the following formula in cell E1:
=IF(C3>D3, “Met Quota”, “Did Not Meet Quota”)
This IF statement will tell us if the first salesperson met their quota or not. We would then copy and paste this formula along all the entries in the list. It would change for each sales person.
Having the result right there from the IF statement is a lot easier than manually figuring this out.

Excel IF Function

Excel IF function
Summary 
The IF function can perform a logical test and return one value for a TRUE result, and another for a FALSE result. For example, to "pass" scores above 70: =IF(A1>70,"Pass","Fail"). More than one condition can be tested by nesting IF functions. The IF function can be combined with logical functions like AND and OR.
Purpose 
Test for a specific condition
Return value 
The values you supply for TRUE or FALSE
Syntax 
=IF (logical_test, [value_if_true], [value_if_false])
Arguments 
  • logical_test - A value or logical expression that can be evaluated as TRUE or FALSE.
  • value_if_true - [optional] The value to return when logical_test evaluates to TRUE.
  • value_if_false - [optional] The value to return when logical_test evaluates to FALSE.
Usage notes 
Use the IF function to test for or evaluate certain conditions, and then react differently depending on whether the test was TRUE or FALSE.
In the example shown, we want to assign either "Pass" or "Fail" based on a test score. A passing score is 70 or higher. The formula in D6, copied down, is:
=IF(C6>=70,"Pass","Fail")
Translation: If the value in C6 is greater than or equal to 70, return "Pass". Otherwise, return "Fail".
The logical flow this formula could be reversed. A formula with the same result could be written like this:
=IF(C6<70,"Fail","Pass")
Translation: If the value in C6 is less than 70, return "Fail". Otherwise, return "Pass".
Either formula above, when copied down the column, will test every score and return the correct result.
Note: If you are new to the idea of formula criteria, this article shows many examples.

Nested IF statements

The IF function can be "nested". A "nested IF" refers to a formula where at least one IF function is nested inside another in order to test for more conditions and return more possible results. Each IF statement needs to be carefully "nested" inside another so that the logic is correct.
For example, the following formula can be used to assign an grade rather than a pass / fail result:
=IF(C6<70,"F",IF(C6<75,"D",IF(C6<85,"C",IF(C6<95,"B","A"))))
Up to 64 IF functions can be nested. However, in general, you should consider other functions, like VLOOKUP or HLOOKUP for more complex scenarios, because they can handle more conditions in much more streamlined fashion.

Logical operators

When you are constructing a test with IF, you can use any of the following logical operators:

Comments

Interactive Blogposts

Top 100 Useful Excel Macro [VBA] Codes Examples

Yogendra98.blogpost.com You can automate small as well as heavy tasks with VBA codes. And do you know with the help of macros, you can break all the limitations of Excel which you think Excel has? So today, I have listed some of the useful codes e xamples to help you become more productive in your day to day work. You can use these codes even if you haven't used VBA before that. All you have to do just paste these codes in your VBA editor. These codes will exactly do the same thing which headings are telling you. For your convenience, please follow these steps to add these codes to your workbook. Before you use these codes, make sure you have your developer tab on your Excel ribbon to access VB editor. If you don't have please use these simple steps to  activate developer tab . Once you activate developer tab, you can use below steps to paste a VBA code into VB editor. Don't Forget:   Make sure to  download thi...

29 Incredibly Useful Websites You Wish You Knew Earlier@yogendra

Share Pin it Tweet Share Email There are so many wonderful websites around, and it is difficult to know each and every one of them. The below list provides some of those websites that I find particularly helpful, even though they are not as famous or as prevalent as some of the big names out there. 1.  BugMeNot Are you bugged constantly to sign up for websites, even though you do not wish to share your email? If yes, then BugMeNot is for you. Instead of creating new logins, BugMeNot has shared logins across thousands of websites which can be used. . 2.  Get Notify This nifty little website tracks whether the emails sent by you were opened and read by the receiver. Moreover, it also provides the recipient’s IP Address, location, browser details, and more. 3.  Zero Dollar Movies If you are on a constant lookout of free full length movies, then Zero Dollar movies provides a collection of over 15,000 movies in multipl...

рдиेрд▓्рд╕рди рдоंрдбेрд▓ा

рдордИ 2008 рдоें рдоंрдбेрд▓ा рджрдХ्рд╖िрдг рдЕрдл्рд░ीрдХा рдХे рд░ाрд╖्рдЯ्рд░рдкрддि рдкрдж рдмрд╣ाрд▓ 10 рдордИ 1994 – 14 рдЬूрди 1999 рд╕рд╣ाрдпрдХ рдеाрдмो рдо्рд╡ूрдпेрд▓рд╡ा рдо्рдмेрдХी рдПрдл рдбрдм्рд▓्рдпू рдбी рдХ्рд▓ेрд░्рдХ рдкूрд░्рд╡ा рдзिрдХाрд░ी рдПрдл рдбрдм्рд▓्рдпू рдбी рдХ्рд▓ेрд░्рдХ рдЙрдд्рддрд░ा рдзिрдХाрд░ी рдеाрдмो рдо्рд╡ूрдпेрд▓рд╡ा рдо्рдмेрдХी рдЬрди्рдо 18 рдЬुрд▓ाрдИ 1918   рдо्рд╡ेрдЬ़ो , рдХेрдк рдк्рд░ांрдд,  рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рдоृрдд्рдпु 5 рджिрд╕рдо्рдмрд░ 2013 (рдЙрдо्рд░ 95) рд╣्рдпूрдЯрди,  рдЬोрд╣ाрди्рд╕рдмрд░्рдЧ , рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рдЬрди्рдо рдХा рдиाрдо рд░ोрд▓ीрд╣्рд▓рд▓ा рдоंрдбेрд▓ा рд░ाрд╖्рдЯ्рд░ीрдпрддा рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХी рд░ाрдЬрдиीрддिрдХ рджрд▓ рдЕрдл्рд░ीрдХрди рдиेрд╢рдирд▓ рдХांрдЧ्рд░ेрд╕ рдЬीрд╡рди рд╕ंрдЧी рдПрд╡рд▓िрди рдирдЯोрдХो рдоेрд╕ (рд╡ि 1944–1957; рддрд▓ाрдХ) рд╡िрдиी рдорджिрдХिрдЬ़ेрд▓ा (рд╡ि 1958–1996; рддрд▓ाрдХ़) рдЧ्рд░ाрд╢ा рдоैрдЪрд▓ (рд╡ि 1998–2013; рдоृрдд्рдпुрдкрд░्рдпंрдд) рдмрдЪ्рдЪे рдоेрдбिрдХा рдеेрдордмेрдХрд▓ рдоंрдбेрд▓ा рдоैрдХрдЬ़िрд╡ рдоंрдбेрд▓ा рдоैрдХрдЧाрдеो рд▓ेрд╡ाрдиिрдХा рдоंрдбेрд▓ा рдоैрдХрдЬ़िрд╡ рдоंрдбेрд▓ा рдЬ़ेрдиाрдиी рдоंрдбेрд▓ा рдЬ़िрдирдЬ़िрд╕्рд╡ा рдоंрдбेрд▓ा рдиिрд╡ाрд╕ рд╣्рдпूрдЯрди рдПрд╕्рдЯेрдЯ, рдЬोрд╣ाрдирд╕рдмрд░्рдЧ, рдЧौрдЯेंрдЧ, рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рд╢ैрдХ्рд╖िрдХ рд╕рдо्рдмрдж्рдзрддा рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рдлोрд░्рдЯ рд╣ेрд░ рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рд▓ंрджрди рдПрдХ्рд╕рдЯрд░्рдирд▓ рд╕िрд╕्рдЯрдо рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рд╕ाрдЙрде рдЕрдл्рд░ीрдХा рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рдж рд╡िрдЯрд╡ाрдЯрд░рд╕्рд░ांрдб рдзрд░्рдо рдИрд╕ाрдИ ( рдоेрдеोрдбिрдЬ़्рдо ) рд╣рд╕्рддाрдХ्рд╖рд░ рдЬाрд▓рд╕्рдерд▓ www...