Excel if function in Microsoft excel is a basic function which is used by most of us for various formulas. If you want to learn about this function you can buy books about the Microsoft excel by eBay or Amazon stores. However this is a cost for you and is not given an instant solution to your issue. Read below to learn the basics about sumif, averageif functions or find maximum when we have to use if to filter data. Follow below steps to learn how doing it. Let's assume that company ABC is doing computer related sales and data sheet extracted from it's cash book.
averageif
- Download the excel file from here (or you can type the data into excel file in your computer.)
- Then Select the cell J1
- Now Enter the "=averageif(" (If you need filter data using 2 or more conditions use "averageifs(" )
- Then Select the range which you wish to have your condition. For this example it is a cell range which has names (our condition is "Asela"). Select the range E2:E13.
- Then we have to enter the condition. Our condition is "Asela" and enter it within inverted commas.
- Finally enter the cell range which has the values to add. For this example it is D2:D13.
- After that Press enter and check whether your answer is equal to $196.43. If it is your formula is correct. If not check your formula.
sumif
- Select the cell J5
- Then Enter the function "=sumif (" (If you need filter data using 2 or more conditions use "sumifs(" )
- After that Follow the steps 4, 5, 6 and 7 in above example. (Note that here out condition is "Monday")
- Your answer should be $825
Find Maximum or Minimum With Condition
When you try to use maxif or minif as we done earlier for average or sum you can notice that there is no maxif or minif function. Then how we find the maximum or minimum with the condition? The answer is use array formula which includes max (min) and if functions. Follow below steps to do this.
- Select Cell J9
- Then Enter the "=max(" (or "=min(" )
- Now enter "if(" (now formula bar shows "=max(if(" )
- After that enter the condition as we enter to the "if" function. We are going to find maximum sales value in Friday. Therefor our condition is "B2:B13="Friday" ".
- Then select the range which is to be look if the condition is true. Since are going to find maximum sale value our range is D2:D13
- Now close the two functions "if" and "max" and press enter.
- This time you got wrong answer because we didn't activate the array function yet. To do that follow below steps.
- Then select the cell J9
- Now press F2 Key
- Press Ctrl + Shift + Enter
- Now you have the right answer which is equal to $60