decision-making functions in excel

55
Decision-Making Functions in Excel Publication Date: May 2021

Upload: others

Post on 05-Apr-2022

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Publication Date: May 2021

Page 2: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 2

Decision Making Functions in Excel

Copyright © 2009 by

Mill Creek Publishing

P.O. Box 11, Zionsville, IN 46077

Updated: June 2020

All rights reserved. No part of this course may be reproduced in any form or by any means, without permission in writing from the publisher. The author is not engaged by this text or any accompanying lecture or electronic media in the rendering of legal, tax, accounting, or similar professional services. While the legal, tax, and accounting issues discussed in this material have been reviewed with sources believed to be reliable, concepts discussed can be affected by changes in the law or in the interpretation of such laws since this text was printed. For that reason, the accuracy and completeness of this information and the author's opinions based thereon cannot be guaranteed. In addition, state or local tax laws and procedural rules may have a material impact on the general discussion. As a result, the strategies suggested may not be suitable for every individual. Before taking any action, all references and citations should be checked and updated accordingly. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional service. If legal advice or other expert advice is required, the services of a competent professional person should be sought. --From a Declaration of Principles jointly adopted by a committee of the American Bar Association and a Committee of Publishers and Associations. All numerical values in this course are examples subject to change. The current values may vary and may

not be valid in the present economic environment.

Page 3: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 3

Contents OVERVIEW ................................................................................................................................................... 5 IF STATEMENTS ......................................................................................................................................... 6 REVIEW EXERCISE ...................................................................................................................................11 NESTED IF ...................................................................................................................................................12 IFs FUNCTION .............................................................................................................................................15 REVIEW EXERCISE ...................................................................................................................................18 EMBEDDED IFS ..........................................................................................................................................19 REVIEW EXERCISE ...................................................................................................................................23 IFERROR and IFNA .....................................................................................................................................24 AND, OR and NOT .......................................................................................................................................27 REVIEW EXERCISE ...................................................................................................................................30 REVIEW QUESTIONS ................................................................................................................................31 SUMIF ...........................................................................................................................................................32 REVIEW EXERCISE ...................................................................................................................................34 AVERAGEIF ................................................................................................................................................35 COUNTIF ......................................................................................................................................................37 THE PLURALS ............................................................................................................................................40 REVIEW EXERCISE ...................................................................................................................................44 SWITCH ........................................................................................................................................................45 REVIEW QUESTIONS ................................................................................................................................47 GLOSSARY ..................................................................................................................................................48 EXAM ...........................................................................................................................................................49 INDEX ..........................................................................................................................................................52 EXPLANATIONS TO REVIEW QUESTIONS ...........................................................................................53

Page 4: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 4

Course Description: This course overviews several Excel Logical functions, such as IF, IFS, AND, OR and then covers other decision-making functions such as AVERAGEIF, SUMIF, SUMIFs, COUNTIFs and MAXIFS. IFERROR and IFNA are also covered. You will find these functions useful in your budgeting and analysis work. This eBook includes exercise files. Learning Objectives: By the end of this course, participants should be able to:

1. Identify different decision making functions and their purpose so the correct one can be selected.

2. Recognize the components of the Logic Functions . 3. Recognize and apply the syntax of different decision making functions 4. Be able to differentiate and use nested and embedded IF functions.

Prerequisite: This course is considered a basic to intermediate level course. Version: This EBook is designed for professionals using Excel 2019 and Microsoft 365. If you have an earlier Excel version, you should have no difficulty however you will not have access to all of the functions covered here. Advance Preparation: None NASBA Classification: Computer Software and Applications

Finding and Using the Student Data Files Using this manual and the accompanying exercise files you will be able to work at

your own pace. The answers to each of the exercises are also in the file.

Files can be found at the Course Overview page of the website. From the Course

Overview page, download the zip file to your hard drive by selecting ‘Other Materials

Download’ and then double-click to extract the files. You can specify where you want

Excel to put the files using the Save As command. Start Excel. Go to the File Ribbon,

select Open and then find the file on your hard drive.

Page 5: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 5

OVERVIEW Excel offers a variety of Logic Functions that allow you to test a cell to answer the question “Is this true or false?” Most people have heard of IF statements and that is what we are going to start with. We are going to create a simple IF statement to determine whether a salesperson has met or achieved his sales quota. From there, we will build and create a nested IF which is combining multiple IF statements together since a simple IF statement can only test for 2 conditions (one true and one false) and sometimes you one to test for more than 2 conditions. In our example, we are going to start by looking at a travel company trying to determine if their bike tours are full, under booked or overbooked. We will also take a look at an Excel 2019 function called IFs that takes the work out of doing a nested IF. Then, we will move on to an embedded IF which is similar to a nested IF, only in this case you are combining an IF statement with a different function. Then, to complete the Logic category, we will look at the AND and the OR functions and combine those with an IF. These can be very powerful as they allow you to test up to 30 different conditions at one time. We will then finish by looking at two other extremely useful functions that ask the question “Is this true?”. However, they are not considered Logic Functions because they only look at the “true” component. SUMIF is a Math and Trig Function that sums or adds up whatever is true and COUNTIF is a Statistical function that counts whatever is true. We will also overview similar functions, nicknamed the Plurals, SUMIFs, COUNTIFs and AVERAGEIFs, MAXIFS and MINIFS which while similar can test up to 127 conditions. It sounds like a lot; however, we will be going through this in a step by step process. There is an explanation of what we are going to do and then you will see a YOU TRY IT! exercise which prompts you to open a specific Excel file and select a sheet or tab. The steps and screenshots walk you through it. Each exercise has an answer sheet so you can compare your answer to it. We will finish with a quick overview of the SWITCH function. Periodically, you will see a review exercise that is designed for you to try on your own. Generally, they provide fewer instructions but they are similar to the You TRY IT exercise, you have just completed. Each exercise has an answer sheet with the answer and sometimes it also displays screenshots. I think you will find this one of the most useful CPE courses that you have ever taken! If you are looking for more Excel tips check out my blog “Chatting about Excel and More on Excel-Diva. The URL is http://excel-diva.blogspot.com/ Thank you. Patricia McCarthy

Page 6: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 6

IF STATEMENTS Logical functions allow you to analyze data and make decisions based upon parameters that you specify. The most familiar Logical Function is =IF(); although, Excel offers many logic functions and surprisingly some “logic” functions that are not found in the Excel logical category! The IF() function evaluates the parameters that you have set and determines that if the resulting condition is negative (or not true) then one action is taken; however, if it determines that the resulting condition or answer is correct (or true) then another action is taken. Since Logical Functions can be applied to a multitude of situations they are considered quite powerful. Some examples include:

• determining if a salesperson met his/her quota so that a bonus can be determined

• testing several different requirements for executive bonus payouts

• determining what discount a customer qualifies for based upon purchases In our first exercise, we are going to test and determine whether salespeople qualified for a sales contest trip to Hawaii. To qualify the salesperson’s first quarter sales must have equaled or exceeded his or her quota. Operators used in the logical test

= Equal to > Greater than >= Greater than or equal to < Less than <= Less than or equal to <> Not equal

Tip: Many people forget about that last operator <>. It can often be quite useful sometimes to just select that rather than making a nested statement testing multiple variables.

YOU TRY IT!

1. Open IF.xlsx and click on the sheet named Sales Trip if necessary. Look at row 6. Brady had 1st quarter sales of 64,000 and a quota of 62,700 so we know that he did qualify for the trip since he beat his quota. Let’s see if Excel agrees.

2. Click in Cell G6 and click on the (Insert function) icon located directly above Column C and D on the formula entry bar.

3. From the Or select a category: drop-down box select Logical. 4. Select the IF function from the Select a function: section.

Page 7: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 7

5. Click OK. A Function Arguments dialog box will display:

6. In the Logical_test component, type E6>=F6.

This is what we are testing - Is Qtr1 sales greater than or equal to the quota value in cell F6?

7. In the Value_if_true, Type “Yes”. If the test is met – if it is true -then display Yes as the salesperson qualifies.

8. In the Value_if_false, type “ “ (type an empty set of quotes). We are telling Excel -If the test is not met, if it is false, then enter a blank space.

Page 8: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 8

9. Click OK.

You should see the word Yes display in G6.

10. Copy the formula down for the other salespeople. You should see that Brees did not qualify for the trip. Change Brady’s quota in F6 to 80,000 and notice that he no longer qualifies for the trip. Excel automatically updates the answer as values change.

Tip: Always make sure that you test the entire formula. In other words, test both a true and a false scenario to make sure everything works properly. Don’t assume that since you had the correct answer for Brady that you correct answer for someone who did not qualify.

Page 9: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 9

Text in an If Statement If you are using text in your IF statements, then it needs to be enclosed in quotation marks. The quotation marks notify Excel that you want the text to be displayed exactly as typed. This is true whether the text is in the conditional test, the true component or the false component of the function. Tip: If there is no formula result displayed in the dialog box then you have an error and it maybe that you forgot a quotation.

Anything in quotes is treated as a literal so you do not want to put quotes around numbers or formulas! This can be particularly important. For example, if I put quotations around a 0, Excel would not be able to do any mathematical calculations on the cell containing the 0 as it would assume it was text.

=IF (E6>=F5,”Yes”,” “) =IF (E6>=F5, “Yes”, 0) In the first IF statement shown above, Excel will display the word Yes if the salesperson qualifies for the sales trip and it will display a blank if the salesperson does not qualify. In the second IF statement, Excel will display a zero if the salesperson does not qualify. YOU TRY IT! Our next exercise, on the Bonus sheet, incorporates some basic mathematical calculations into an IF statement. We are going to determine the Base pay +bonus for each salesperson. Their bonus is 10% of Base Sales if they met or exceeded quota. The base salary of each person is shown in column B. Their quarterly sales and their total sales are shown in Columns C through G and the quota they had to meet is displayed in Column H. 1. Open IF.xlsx and click on Bonus sheet if necessary.

2. Click in Cell I6 and click on the button.

Page 10: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 10

3. From the select a category: drop-down select Logical. 4. Select IF from the Select a function: section.

Excel usually remembers and displays the last function category that you used. 5. Click OK. 6. In the Logical_test component, type G6>=H6. We are testing - Is Total Sales in G6 greater than or equal to the quota in cell H6? 7. In the Value_if_ true, Type B6+(G6*10%).

Make sure that you do NOT put quotes around the equation. Only text needs quotes. If the test is met, then he would have earned his Base Pay of $25,000 + bonus (10% *$259,578) which would equal $50,957.80. Tip You can use either % or decimals.

8. In the Value_ if_false, type B6. If the test is not met, if he did not meet his quota then all he earned was his base pay, which can be found in cell B6 and is $25,000.

9. Click OK. 10. Copy the formula down.

Page 11: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 11

REVIEW EXERCISE If you are looking for additional practice on simple IF statements before moving on to more complex IF statements, then click on the sheet called Practice which is in IF.xlsx.

1. Click in Cell E6. 2. Create an IF statement that tests if actual units (Column C) are greater than or equal to

forecasted units (Column D). 3. If actual units are greater than or equal to forecasted units, then display a blank cell

otherwise display the shortfall of forecasted units from actual units (Column D-Column C). You can find the answer is on the sheet immediately after named Practice Answer.

Tip: If you want to look at the formula or edit it simply click on and the formula will appear unless the formula has a serious flaw.

Page 12: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 12

NESTED IF IF statements, as you have seen, can be quite useful; however, they can be limiting since you can only test two conditions. A way around this is to nest IF statements together so you can test for several conditions at once. Good news, in the newest versions of Excel, there is a work around for nested IFs and that is discussed immediately following this section. So, some of you may wish to just scan this section. Some examples for using a Nested IF Statement

• Offering customers various discounts based upon a pricing schedule

• Calculating bonus incentives based upon pay grade and other parameters

• Pricing items depending upon condition, price or date of purchase. You create a nested IF by using an IF function within another IF statement. Creating a nested IF is fairly simple; however, you do have to watch those parentheses if you are nesting several together. Excel claims you can nest up to 64 levels however I have had several people write to me about the difficulty of achieving that. Frankly, if you are ever considering nesting anything close to 64 IF statements, I strongly recommend you consider using another function instead particularly the VLOOKUP or INDEX MATCH functions. Trying to audit or edit a 64 level nested IF would definitely create some stress. You also need to consider the sequence of your tests or conditions as the IF statement tests each condition as it reads it. If it does not find that any of the conditions are true, it automatically treats it as a False. Also, once it finds a true, it stops looking further. Sequencing of your tests or logical conditions is extremely important. To create a nested IF with three conditions

1. Start the IF, as you normally would and enter the Logical _test and the Value_if_True argument.

2. Click in the Value_if_False argument and click on the drop-down arrow in the Name Box (above column A and above row 1) and select IF.

The dialog box collapses and is replaced with a brand new IF dialog box. (If you check the formula bar, you will see the earlier part of the formula still exists!) 3. Enter the next test, the true and the false argument. 4. Click OK to see the resulting answer. 5. Copy the formula down if you are satisfied with it.

Warning: The most common error found is that people inadvertently click twice or have their cursor in the wrong spot. If you see a plus (+) as if Excel is trying to add 2 IF together then you need to clear the formula entry bar and start again.

Page 13: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 13

YOU TRY IT! In this exercise, you are going to test for 3 conditions so you will need to use 2 IF statements since a single IF only allows you to test for two conditions. For the travel agency, you need to determine which bike tours are overbooked, which are full, and which are undercooked.

1. Open Nested IF.xlsx and click on the sheet named Bike Trip tab if necessary.

2. Click in Cell E14 and click on the button located above Column B Allows you to access the list of functions. Excel will place the answer in cell E14 and display the Tour Status.

3. From the select a category: drop-down box, select Logical. 4. From the Select a function: list, select IF. 5. Click OK. 6. In the logical test component, type C14>D14.

This is what we are testing - Is Tour Capacity greater than Number Booked? 7. In the Value_if_true, type “Underbooked”.

If the test is met, then the Tour is Overbooked. 8. Click in the Value_if_false argument box.

If the test is not met, we have 2 conditions left (Full and Overbooked) so we need to access another IF Statement. Make sure that your cursor is in the Value_if_false argument or this will not work properly.

9. Click on the drop-down arrow in the Name Box (located above row 1).

10. Select the IF statement.

We are accessing a 2nd IF function. The initial function has not disappeared. It is still in memory and can be seen up at the formula entry bar.

11. In the logical test type, C14=D14. This is the second test. - Is capacity equal to number booked?

Page 14: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 14

12. In the Value_if_true, type “Full”. If capacity and # booked are equal, then the trip is Full. (Don’t forget the quotation marks around the word Full)

13. In the Value_if_false type “Overbooked”. If it is not Underbooked and it is not Full then it must be Overbooked. Don’t forget the quotation marks. Don’t forget, Excel tests each condition it finds and if the test is not met then it moves on. In this case, if no other test is met then it must be Overbooked.

14. Click OK. 15. Copy the formula down.

If you go back in to edit or look at the formula, you will see that Excel combines the IF statements together so that it is looks like the example below.

Page 15: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 15

IFs FUNCTION Let’s take this same exercise and use the IFs function. This function is available if you have Excel 2019 or Office 365. IFs() allows you to test up to 127 different conditions, however, creating that many is not recommended for the reasons stated above in the nested IF section. In many ways, using this function is much easier than using a nested IF. However, be aware that there is no False component in the syntax. Excel tests to see if your test is true and if it is then it returns that value. If it is not true and it cannot find a True somewhere in the arguments, then it displays a #N/A error. Let’s Try It

1. Click on the sheet named Bike Trip with IFs. This sheet is the exact same scenario as the one you just competed. However, in this example, we are going to use IFs().

2. Click in cell E14.

3. Click the icon and select Logical.

4. Click IFs. 5. Click OK.

Page 16: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 16

6. Enter the first Logical test in Logical_test1 which was C14>D14. 7. In the Value if true1, type “underbooked”. 8. In the Logical_test2, type C14=D14. 9. In the Value_if_true2, type “Full”. 10. In the Logical_test3, type C14<D14. 11. In the Value_if_true3, type “overbooked”. 12. Click OK. 13. If you don’t see Logical_test3 in the dialog box, you may need to scroll down in the

dialog box to see it.

As I mentioned, quite a bit easier. If you could not find the function in the logical section, then that means your version of Excel does not have it.

Page 17: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 17

Page 18: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 18

REVIEW EXERCISE Although it did not matter in our first example with the bike trips, sequencing of the tests or the conditions can matter particularly if you are testing years and numbers. Remember, Excel tests each condition and anything that is not “true” gets lumped into the last condition. In our first example, anything that was not underbooked or full automatically fell into the overbooked category. In the sheet named Sale Time, you are given a pricing scenario where the tag price is based upon the model year of the car.

• All products with a model year before 1998 should be tagged Clearance.

• All products from 1998 on should be tagged Sale

• All products with a 2000 model year should be marked Regular Price.

1. Click in cell E7 and create a nested IF or use IFs and test for the pricing scenarios above and then copy it down.

The answers can be found the sheet following it. There are different ways to do create the calculation so if your calculation is not identical don’t worry as long as it works for all the model years. Tip: Start with the highest number or year and work your way down

Challenge - Review: Okay, if you are really into it, then try the Challenge-Nested with 3 IFs which is located in the same file Nested_If.xlsx. This is optional. The answer is on the sheet following it in the Excel file.

Page 19: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 19

EMBEDDED IFS An embedded IF statement is very similar to a nested IF statement. The only difference is that instead of nesting an IF within an IF you nest a different function inside it. The three most common function categories people nest inside an IF are Logical Functions, Information Functions and Lookup Functions. We are going to take a look at an Information Function called ISERROR. Many times, particularly when importing data, a formula may return an error message such as #N/A or everyone’s favorite #DIV/0! These error messages generally negate the professional look of a report so many people like to get rid of them and clean up the appearance of a report.

The ISERR and ISERROR functions test whether a formula displays an error message and then return a TRUE if there is an error message or a FALSE if there is not an error message. By themselves, neither of these functions is too exciting, however, when combined with an IF they become particularly useful. Before we join them together, let’s take a look at ISERROR and make sure you understand it. YOU TRY IT! What we are going to do is test cell F7, as shown in the screenshot above, to see if the cell contains an error value. Obviously, we can look at it and see that it does not contain an error so we should expect it to display an answer of False. Whereas cell F9 contains an error and should display a False.

1. Open Error_EmbedIF.xlsx and click on the sheet named ISERROR if necessary.

2. Click in Cell G7 and click on the button. 3. From the drop-down box in Or select a category: dialog box, select Information.

Page 20: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 20

4. Select the ISERROR function. 5. Click OK. 6. Click in the Value section and type F7 (or click on cell F7).

You are testing cell F7 to see if it contains an Error message.

7. Click OK. False displays- showing that there is no error in cell F7.

8. Copy the formula down. Notice that cell G9 displays True to reflect that cell F9 contains an error. Hey, I already warned you that this function was not overly exciting by itself, however, you need to understand how it works before we combined it with an IF. I promise you will find this next part more interesting and a lot more useful. Honest.

Page 21: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 21

YOU TRY IT! In the spreadsheet shown below, we have sales and returns. We want to create a new column called % returns; however, because some of the cell entries in column F have #N/As, it looks messy and our new column will not look very professional.

We are going to create an IF statement that tells Excel, when it divides Column E and F, it should just display a blank if the resulting answer is an error; otherwise, it should display the correct answer.

Tip: Sometimes when creating complex and nested IF statements, it is difficult to get back into the dialog box to add in the TRUE/FALSE components so it is recommended that you do the TRUE and FALSE components first and then do logical test if you are embedding another function.

Warning: When going to the Name Box to select the function to embed in the IF statement, you

may need to scroll to the bottom of the list and select to find it. Once, you have used the function, Excel does remember it.

1. Open Error_Embed.xlsx. and click on sheet named IF and ISERROR if necessary. To access file and the appropriate sheet. Make sure you are on IF_and_ISERROR sheet.

2. Click in Cell G6 and click on the button. 3. Select Logical as the function category. 4. Select the IF function. 5. Click in the Value_if_true argument and type “ “ (type an empty set of quotes).

Click in the Value_if_false argument and type F6/E6. Make sure your cursor is in the correct spot in the dialog box! We are telling Excel that if there is an Error message to just display a blank cell. If the

Page 22: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 22

test is false, if there is no error then divide sales and returns to determine the % of returns.

6. Click in the Logical_test argument. 7. Click on the drop-down arrow beside the Name Box. (DO NOT CLICK ON THE Name Box

itself and select the ISERROR function.

You are nesting the ISERROR function inside the IF. You need to click on the drop-down arrow beside the Name Box. If you click on the Name Box, it will assume you want another IF function and retrieve that instead of letting you select ISERROR. If you can’t find the ISERROR function, click on the More Functions at the bottom of the function list.

8. In the ISERROR value argument type F6/E6. You are testing to see if F6/E6 creates an error message- this is what the IF will test.

9. Click OK.

The ISERROR component of the formula is complete.

Page 23: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 23

10. Click OK. 11. Copy the formula down.

REVIEW EXERCISE 1. Open up Error_EmbedIF.xlsx if necessary and click on the sheet named NO DATA. This is essentially the same exercise as the one just completed; however, this time if there is an error we want the words “No Data” to display instead of a blank. If there is no error, then the % return which is F6/E6 should be calculated and display. The answer is on the NO DATA Answer sheet in the Excel file.

Page 24: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 24

IFERROR and IFNA Excel 2007 introduced a new function called IFERROR that essentially combined the IF and the ISERROR function. IFERROR will meet your needs most of the time; however, I still thought it was important to show you how the ISERROR and the IF worked together as many people are still using Excel 2003. In addition, it is still important to understand how the information functions work. The syntax of the function is easier as it does not require a TRUE and a FALSE component. If the value or resulting calculation does not have an error, then the answer is automatically entered into the cell. If the resulting calculation is going to be an error than you can tell Excel what to replace it with. In the example, below, I told Excel to display a blank space if the resulting answer was an error.

LET’S TRY IT! We are going to use IFERROR to replace any error values with a blank or empty cell. 1. Open IFERROR.xlsx. and click on the sheet named IFERROR if necessary.

2. Click in Cell G6 and click on the button. From the select a category: drop-down list, select Logical.

3. Select the IFERROR function from the Select a function: list.

Page 25: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 25

4. Click OK. 5. Click in the Value_argument.

Make sure you are in the correct spot in the dialog box! 6. Type F6/E6. 7. Click in the Value_if_error argument type “ “ (type an empty set of quotes).

If the test indicates there is an error then we are telling Excel to display a blank cell.

8. Click OK.

Excel returns an answer- either the calculation of F6/E6 or a blank cell. In Excel 2013, Microsoft introduced a function named IFNA (), which is similar to IFERROR(). IFNA () is just a bit more specific as it only tests for #N/A errors and is popular if you are using VLOOKUP formulas or the IFs function. I changed the example slightly on the sheet named IFNA so that we have a #DIV/0! Error at G7.

Page 26: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 26

IFERROR would recognize and handle both the #N/A error as well as the #DIV/0! However, IFNA can only treat #N/A errors. Notice that row 6 still displays a #DIV/0! Error using

However, IFNA can only treat #N/A errors. Notice that row 7 still displays a #DIV/0! Error using IFNA.

Page 27: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 27

AND, OR and NOT AND, OR and NOT are considered logical functions and are usually found nested in other functions such as an IF. These three functions return either a TRUE or a FALSE, which can be used in other calculations to continue a calculation or decision. The syntax for these three functions is Function (logical1, logical2....)

• And tests whether all the arguments are TRUE

• OR tests if any of the arguments are TRUE

• Not tests whether the criterion is NOT TRUE – for a single test AND as well as OR allow you to test up to 30 conditions while NOT only allows for one variable or one test. In the example below I am testing for two conditions - customers receive a discount if the Product is from Tanzania and the Quantity Sold is greater than or equal to 50. So, I would use the following nested function of IF and to see if the customer qualified for a discount. To qualify the Product (coffee beans) has to be from Tanzania (C8) and the Quantity Sold has to be >=50 (E8). If both cells met the criteria than the resulting answer would calculate the new price after discount.

Tip: Enter the TRUE/FALSE arguments first, as it is difficult to get back into the function dialog box to edit the original IF statement when adding an additional logic function into it.

Page 28: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 28

YOU TRY IT! In this exercise, we are using AND to determine that whether all conditions have been met. If all conditions have been met, then the company is entitled to a 10% discount (90% of the sales price). 1. Open AND_OR.xlsx and click on the sheet named Java Joe if necessary.

2. Click in Cell G8 and click on the button. 3. Select Logical from the function category list. 4. Select the IF function. 5. Click OK. 6. Click in the Value_if_true argument type F8*90%.

Make sure your cursor is in the correct spot in the dialog box! We are telling Excel that if there all the conditions are met then the company is entitled to a 10% discount or 90% of the sales price.

7. Click in the Value_if_false argument type F8.

If the test is false, if all of the conditions are not met, then the company is not entitled to a discount and must pay the total sales price which is in F8.

8. Click in the Logical_test argument. 9. Click on the drop-down arrow beside the Name Box (DO NOT CLICK ON THE NAME BOX

ITSELF) and select More Functions.

Page 29: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 29

10. From the dialog box, select the Logical category.

Since you have not accessed AND before, when you click on the drop-down arrow of the Name Box, you will need to select More Functions. Once you use a function it will appear on the list when you next click the drop-down arrow.

11. Click on AND. 12. Click OK.

1. In the logical 1 argument type C8=”Tanzania”.

This first condition tests to determine if the product is from Tanzania. The quotations are used because Tanzania is text.

2. In the logical 2 argument type E8>=50. The second condition tests if the Quantity sold is greater than or equal to 50.

3. Click OK. We only had 2 conditions to test so we have completed the AND and the rest of the function as this was the last component.

4. Copy down the formula. You should see that two customers have earned the discount as they both purchased Tanzania product and their purchase was 50 pounds or more.

Page 30: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 30

REVIEW EXERCISE Click on AND_OR.xlsx if necessary and select the sheet named OR TRY IT. This exercise is similar to the previous one although not identical as you are going to use OR instead of AND. In addition, the product has changed from Tanzania to French Roast. With an AND all the conditions must be TRUE for Excel to consider the test to have been met; however, with OR as long as one of the conditions have been met, Excel considers the test to have been met. There is an answer sheet for this.

Page 31: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 31

REVIEW QUESTIONS These are review questions that are required by NASBA. They are questions and answers from the course materials to assist you in understanding the course content. There is NO grading on the review questions – they are optional; however, you should find them helpful in preparing for the exam. The Answers and Feedback are located at the end of the EBook.

1. The fx button allows you to A. Access a list of all functions. B. Access only the logical functions. C. Sum data. D. Delete data.

2. Which operator means not equal? A. > B. < C. >= D. <>

3. If you are testing for 3 conditions, you would need ____IF statements. A. 1 B. 2 C. 3 D. 4

4. If you wanted Excel to display a blank or empty cell as part of an IF calculation, you

would type ______________in the function. A. “space” B. “blank” C. “ “ D. empty

5. A/an ___ IF is the term used when you use an IF with a different type of function such as

an Information or Lookup function. A. Nested B. Embedded C. Conjoined D. Looped

6. AND/OR tests are logical functions that can test up to __conditions. A. 10 B. 20 C. 30 D. 40

Page 32: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 32

SUMIF SUMIF is a great function that a lot of people are not familiar with. Basically, it combines two extremely popular functions -the SUM function and the IF Function. SUMIF tests specified cells and if those cells meet certain conditions or “criteria” then the selected cells are summed (or added) up. Think of the possibilities: You can:

• sum up receipts by different lockboxes

• sum up the value of past-due invoices.

• add up negative numbers in a reserve or aging column quickly

• add up the product returns or overtime for a particular day. SUMIF EXAMPLE I am using a very simple example to illustrate SumIF. In the example below, I tested to see if any of the house prices in cells A3: A6 exceeded $150,000, so that I could sum the related realtor commissions. In looking at the example, you can see that there are two houses that meet this criteria (at row 5 and 6) and that the corresponding realtor commissions are in Column B. I sorted the housing prices to make it easier to see; however, they do not need to be sorted for a SUMIF. The house prices at row 5 and 6 met the specified criteria so the corresponding values in Column B, ($10,000 and $12,500) were added up to calculate total commissions on houses with prices over $150,000.

So, basically, the IF component checked to see if any houses were over $150,000 and then the SUM component added up the corresponding realtor commissions associated with those houses in Column A. Pretty neat and saves you creating an IF function in one column and then summing the results of the formula. TWO NOTES OF CAUTION WHEN USING SUMIF.

Page 33: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 33

Notice that I started my range at A3 instead of A2. It is important to remember NOT to include your headings when you select your data as this may result in an incorrect answer. It does not happen all the time but I have seen incorrect calculations when headings have been included. If you use IFs frequently, you may have already noticed the quotation marks around the Criteria. SUMIF is not considered a Logical function; instead, it is considered a Math and Trig function so the syntax is a bit different and quotation marks are needed if you type the criteria in as I did. Excel is forgiving and will usually insert them if you forget in the most recent Excel versions. (If the criterion used is a cell reference, such as B12, then you would not need to use the quotation marks; however, the contents of the cell would need to include the operator if you were using one. In the screenshot below, cell B12 contains >150000 and in the dialog box you can see that Excel is reading it as “>150000”.

YOU TRY IT!

1. Open SumIF.xlsx and click on the tab named Commission if necessary. 2. Click in cell B12.

Page 34: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 34

3. Click on the button located directly above Column B and select Math & Trig from the select a category: section.

4. Scroll down to the Select a function: list and select SumIF.

This function will test the condition and add up all those cells that meet the test. 5. Click OK. 6. Click in the Range argument and type A3:A6 .

You are testing the housing prices in Column A. 7. Click in the Criteria argument and type “>150000”.

To test which houses, have prices greater than 150,000. This is a bit different than a regular IF and requires the quotation marks and operator however if you forget the quotes Excel will usually add them for you – particularly in later versions of Excel.

8. Click in the Sum_range argument and type B3:B6. This tells Excel what cells to add up if they meet the test and conditions already set forth - Add up the commissions on the house price is greater than 150000.

9. Click OK.

REVIEW EXERCISE In this exercise, you are asked to determine the total sales for only the customer named Starbucks using the SUMIF function found in the Math & Trig category. Click on SUMIF.xlsx if necessary and click on the sheet named Starbucks. Click in cell F1 and select the SUMIF function. The range would be the Customers (A7.A19) and the criteria or test is “Starbucks” while the Sum_range is Total Sales (F7.F19). The answer can be found on the sheet following “Starbucks”.

Tip: If you can’t remember what category a function is in, simply select All and all the functions will display in alphabetical order.

Page 35: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 35

AVERAGEIF AVERAGEIF was introduced in a later Excel version but it is quite similar to SUMIF although it is considered a Statistical function. The syntax is (AVERAGEIF(range, criteria, [average_range])

It tests specified cells and if those cells meet certain conditions or “criteria” then selected cells are averaged. YOU TRY IT! In this exercise, we want to determine the average order amount of our Parcel Post shipments.

1. Open AVERAGEIF_COUNTIF.xlsx and click on the tab named Parcel Post Average if necessary.

2. Click in cell E3.

3. Click on the button and select Statistical from the Select a category: section.

4. Select AverageIF. 5. Click OK.

Page 36: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 36

The range we are testing is the Ship Via in Column D. The criteria is “Parcel Post”. The range we want to average, if the condition is met is in Column B.

6. Click OK.

You should see that the average shipment is $1,176.68.

Page 37: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 37

COUNTIF COUNTIF is a Statistical function that counts the number of cells within a range that meets the given criteria. It is quite similar to SUMIF and AVERAGEIF except that it does not have a Sum_Range element since Excel just counts the range related to the criteria. YOU TRY IT! In this exercise we are counting how many of our sales are from our Starbucks customer.

1. Open AVERAGEIF_COUNTIF.xlsx and click on the sheet named Count Starbucks if necessary.

2. Click in cell F1.

3. Click on the button and select Statistical from the Select a category: section.

4. Scroll down the Select a function: list and select COUNTIF.

It will test the condition and count all those cells that meet the test. 5. Click OK. 6. Click in the Range argument and type A7.A19.

You are testing the Customers in Column A. 7. Click in the Criteria argument and type “Starbucks”.

The criteria are only customers that are Starbucks.

Page 38: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 38

8. Click OK.

The resulting answer is 4. There are 4 entries with Starbucks in them.

Page 39: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 39

YOU TRY IT! In this exercise, you are going to count the number of orders shipped where the order amount is under $100. Click on AVERAGEIF_CountIF.xlsx if necessary and click the sheet named Parcel Post TRYIT if necessary. Click on cell E1 and select COUNTIF from the Statistical category. The range would be Order Amount (B6.B180) and the Criteria would be “<100”. Unlike a regular IF statement, you need the quotation marks around the <100 just as you did for SUMIF.

83 is the answer. YOU TRY IT!

1. Count how many shipments went to Parcel Post. The answer is 35 and can be found on the last sheet in the file.

2. Determine the average shipment quantity of parcel post shipments. The answer is 2 and can be found on the last sheet in the file.

Tip: Functions such as IF, SumIF and CountIF as well as many others will accept range names which are quicker and easier to use if your worksheets have a lot of rows. Tip: Wildcards can be used with SUMIF, COUNTIF and AVERAGEIF, which makes them even more powerful. For example, =COUNTIF (A6:A180,”*P*”) would look at the range in A6 through A180 and count all the customers whose names contained a P.

Page 40: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 40

THE PLURALS Over the years, Microsoft has added several new functions that go beyond the simple SUMIF, AVERAGEIF and COUNTIF as they allow you to test up to 127 conditions. These functions are SUMIFS, COUNTIFS and AVERAGEIFS. They were called the Plurals due to the letter “S” at the end of the function name. If you recall IFS() also allows you to test up to 127 conditions. In Excel 2019 and Microsoft 365, MAXIFS and MINIFS were added. MAXIFs allows you to return the largest numeric value meeting one or more criteria while MINIFS allows you to find the smallest numeric value. They all work the same way, so we will just walk through an example using SUMIFS. This example is similar to the SUMIFS exercise we did earlier, however, the data is a little different and this time we want to add up total sales only when three different criteria are met. YOU TRY IT! In this exercise we are going to determine the total sales for Smokin’Suzie if the Quantity Sold exceeds 50 pounds and if the product is from Tanzania. So, in effect, we are testing for 3 items: Smokin’ Suzie, Quantity greater than 50 and Tanzanian coffee.

1. Open PLURALS.xlsx and click on the sheet named Smokin Suzie if necessary. 2. Click in cell G1.

3. Click on the button and select the Math & Trig category. 4. Scroll down the Select a function: list and select SUMIFs.

Make sure you selected SUMIFS and not SUMIF. SUMIFS will test the condition and sum up all those cells that meet the specified conditions.

5. Click OK. 6. Click in the Sum_range argument and type F5.F17.

This is the column you want to add up if all the conditions are met. 7. Click in the Criteria_range1 argument and type A5.F17.

This tells Excel the range of cells where our criteria are going to be located.

8. If necessary, press the Tab key so that you see the argument. 9. Click in Criteria 1 and type “Smokin’ Suzie”.

This tests which Customers in the list are Smokin’ Suzie. MAKE SURE TO TYPE THIS NAME IN CORRECTLY including the apostrophe.

Page 41: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 41

10. Press the Tab key and in Criteria_range2 type C5:C17.

identifies the range of cells containing the product Tanzania.

11. Press the Tab key, if necessary, and in Criteria2 type “Tanzania”. This tells Excel what criteria to search for and to retrieve from C5:C17.

12. Press the Tab key, if necessary, and in Criteria_range3 type E5:E17. This identifies the range of cells containing the quantity.

13. Press the Tab key, if necessary, and type “>50” in Criteria3.

This tells Excel to retrieve cells containing a quantity sold greater than 50. You need quotation marks around the greater than 50. If you omit them, Excel may put them in for you.

14. Click OK.

Page 42: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 42

Even though 127 criteria can be used, you can only base your conditions on the first Criteria_range. In other words, all the conditions were based on the customer being Smokin’ Suzie. A single SUMIFS would not have worked if I had wanted to add up Smokin’ Suzie's sales for Tanzania product and Starbucks’ sales where the quantity exceeded 50. Notice in the argument boxes that Sum_range, Criteria_range1 and Criteria1 are bolded- while the other criteria are not. If you are familiar with filtering data, picture Excel filtering all the data so that only data pertinent to Smokin Suzie displays in the worksheet. From there, additional filtering is applied.

YOU TRY IT! – OTHER PLURALS In this exercise we are going to determine the average sales for Java Josephine if the Product is from Ethiopia and the quantity exceeds 25.

1. Open PLURALS.xlsx and click on the sheet named Java Josephine if necessary. 2. Click in cell H1.

Page 43: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 43

3. Click on the button and select Statistical from the Select a category: section:

4. Scroll down the Select a function: list and select AVERAGEIFS. This function will average all the cells that meet our conditions.

5. Click OK. 6. Click in the Average_range argument and type F6.F18.

This is the column you want to average if all the conditions are met. 7. Click in the Criteria_range1 argument and type A6.F18.

This tells Excel the range of cells where our criteria are located. 8. If necessary, press the Tab key, so you see the argument Criteria1. 9. Click in Criteria 1 and type “Java Josephine”.

This identifies that we only want information on our customer Java Josephine. 10. Press the Tab key, if necessary, and in Criteria_range2 type C6:C18.

This Identifies the range of cells containing the product. 11. Press the Tab key, if necessary, and in Criteria2 type “Ethiopia”.

This tells Excel we only want to retrieve information found in C6:C18 that contain data Ethiopia.

12. Press the Tab key, if necessary, and in Criteria_range3 type E6.E18. This identifies the range of cells containing the quantity sold.

13. Press the Tab key, if necessary, and type “>25”. This tells Excel to retrieve cells containing a quantity greater than 25 from quantity sold. You need quotation marks around the greater than 25.

14. Click OK. The answer is 573.75. There is an answer sheet in the file.'=AVERAGEIFS(F6:F18,A6:A18,"Java Josephine",C6:C18,"Ethiopia",E6:E18,">25")

Page 44: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 44

If you are comfortable with that, try using MINIIFS()) and searching for the lowest Sales price if the customer is Java Josephine and the Product is from Ethiopia. .The syntax for this function is the same except that here we just tested for 2 conditions instead of 3. A screen shot is shown below in case you want to compare. I filtered the data to double-check that my answer of $79.9 was correct

REVIEW EXERCISE

Open PLURALS.xlsx, if necessary, and click on the sheet named SHIPMENTS. Try counting the shipments made via UPS where the salesperson’s name is King, the quantity shipped exceeds 2 and the color of the product is pink. You are testing for 4 things if you include the shipper UPS. In addition, you are testing the number of shipments of pink items, where the quantity is greater than 2 ,and which were sold by the salesman named King. The controlling criteria is the Ship Via.

Page 45: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 45

The answer is on the sheet following SHIPMENTS in the file.

SWITCH Switch is the newest function that Excel introduced in Excel 2019 and Microsoft 365. In my mind, it is a bit of a cross between an IF function and a VLOOKUP function. SWITCH compares one value against a list of values and then returns the first match it finds. The list of values can be referenced or typed in. In the screenshot below, I have 3 employees and their Employee Levels. Every Employee Level has a starting salary. For example, an Employee Level A starts out at $35,000.

In this example, I am telling Excel to look at the value in cell B2 and see if it is equal to an A. If it is, I want it to return a value of $35000 into cell C2. If it is not an A, I want Excel to look and see if it is a B. If it is a B then return the corresponding value of $40000. I hard coded these values in but you could have used absolute cell references as well. You can also set a default value to use if there is no match. If you are handy with text functions then incorporating SWITCH into them may be useful while doing an inventory list of parts and part numbers.

Page 46: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 46

Page 47: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 47

REVIEW QUESTIONS These are review questions that are required by NASBA. They are questions and answers from the course materials to assist you in understanding the course content. There is no grading on the review questions – they are optional; however, you should find them helpful in preparing for the exam. The explanations/ answers can be found at the end of the EBook. 7. If you want to add up a group of numbers if a certain condition is met, you should use

A. ADDIF. B. SUMIF. C. IFSUM. D. COUNTIF.

8. If you want to count a group of numbers if a certain condition is met, you should use

A. COUNT. B. SUMIF. C. IFCOUNT. D. COUNTIF

9.The functions called the Plurals test for up to ____ conditions.

A. 30 B. 67 C. 100 D. 127

Page 48: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 48

GLOSSARY Embedded Function A function within a function Function A customized or built in calculation that simplifies a calculation. For example, the function Average automatically adds and then divides by the number of items to arrive at an answer. Logic Function A function that has a True/False component. The calculation tests for two different events. Nested Function This could also be considered an embedded function but an IF within an IF statement is generally called a Nested IF or Nested function. Wildcard A character or characters that act as a substitute. For example, a ? represents a single wildcard while the asterisk * usually represents one or more characters. Testing for c*t, Excel would consider cot, cat, coat and coast since it would look for anything that began with a c and ended with a t.

Page 49: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 49

EXAM Please select the single best answer.

1. _________functions allow you to analyze data and make decisions based upon parameters that the user specifies.

A. Informational B. Decisional C. Logical D. Text

2. If you were testing to see if sales dollars were greater than budget dollars which

calculation should you use? A. Sales > Budget B. Sales < Budget C. Sales <> Budget D. Sales >= Budget

3. In this equation, =IF(A5>B5,.05,” “), what would display in the answer cell if Excel

determined that A5 was not greater than B5? A. .05 B. “ “ C. A blank or empty cell D. FALSE

4. Which of the following IF calculations is the most correct? A. =IF(A1>B1,”Profit”, Loss) B. =IF(A1>B1,”Profit”,”Loss”) C. =IF(“A1>B1”,Profit,Loss) D. =IF(A1>B0,”Profit”,”Loss)

5. You are calculating your board of directors’ bonuses. The bonuses are based upon the

directors’ meeting several different goals. To test for several conditions or goals, it would be best to use one or more ___ functions.

A. SUMIF B. ISERROR C. COUNTIF D. IF

Page 50: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 50

6. When creating a nested or embedded function, it is recommended that you first create the IF statement and then insert the additional function(s) by clicking on the drop-down arrow in the _____Box.

A. Fx B. Name C. Cell D. Range

7. The nested IF statements below are testing cells A1 and B1. If A1 is greater than B1,

then B6 should be multiplied by 15% however, if A1 is equal to B1, then B6 should be multiplied by 5%. If neither of these conditions is met, then No Bonus will display. Which of the statements below is correct?

A. =IF(A1>B1,B6*15%,IF(A1=B1,b6*5%,No Bonus)) B. =IF(A1>B1,B6*15%,IF(A1=B1,b6*5%,”No Bonus”)) C. =IF(A1>B1,B6*15%,IF(A1=B1,b6+5%,”No Bonus”) D. =IF (A1>B1,B6*15%)+IF(A1=B1,b6*5%,”No Bonus”)

8. ISERROR is considered a/an ___________function. A. Information B. Logic C. Statistical D. Plural

9. Information functions are typically used with the ___function. A. SUMIF B. ISERR C. IF D. AVERAGEIF

10. When creating complex and nested IF statements, it can be difficult to return to the

function wizard dialog box once you start the calculation so it is recommended that you A. Not do them B. Complete the true and false components first C. Do the tests first D. Complete the SUMIF component first

11. If you are testing 30 conditions and want Excel to display a result of TRUE as long as at

least one of the 30 conditions are met, you should use the ________function. A. AND B. OR C. NOT D. SUMIFs

12. When creating a SUMIF function, it is recommended that

Page 51: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 51

A. You include column headings. B. You exclude column headings. C. You exclude row headings. D. You exclude range names.

13. If you were counting a range of words with the equation =COUNTIF(A1.A5,”c*t”) which

of the following words would be EXCLUDED from the count? A. Cot B. Cut C. Christmas D. Coast

14. Kelsey needs to add up her inventory of candy bars. She only wants to add up chocolate

candy bars from England that contain hazelnuts. Which function would you recommend that she use?

A. IF B. SUM C. SUMIF D. SUMIFs

15. If you were going to use the IF statement to test a cell for 2 different conditions how

many IF statements would you need? For example, if your budget was $500 and you wanted to test cell A1 to determine if it was underbudget or overbudget- how many IF statements would you need to combine?

A. 0 B. 1 C. 2 D. 3

Page 52: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 52

INDEX

AND, 27 AverageIfs, 40 Complex IF, 19, 24 Excel 2007, 24 Excel 2007 Functions, 40 Excel 2019, 4, 5, 15, 40, 45 IFERROR, 24 IFs. See NestedIF information function, 19 ISERROR, 19 Logical functions, 6 Math and Trig function, 34 MAXIFS, 4, 5, 40

Microsoft 365, 4, 40, 45 MINIFS, 5, 40 Nested If, 12 NOT, 27 OR, 27 Statistical function, 37 Student Data Files, 4 SUMIF, 32 Sumifs, 40 Switch Function, 45 Text in an If, 9 wildcards, 39

Page 53: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 53

EXPLANATIONS TO REVIEW QUESTIONS 1. The fx button allows you to

A. Access a list of all functions B. Access only the logical functions C. Sum data D. Delete data

A is correct. When a user clicks on the fx button a dialog box pops up where all the functions are categorized by category. B is incorrect. The fx button shows all functions - not just the logical functions. C is incorrect. The fx button does not allow you to sum data although it would allow you to retrieve the sum function and add up data. D is incorrect. The fx button does not delete data. 2. Which operator means not equal?

A. > B. < C. >= D. <>

A is incorrect. This symbol means greater than. B is incorrect. This symbol means less than. C is incorrect. This symbol means greater than or equal to. D is correct. This symbol means not equal to and it can be very useful if you have a number of conditions that you want to test. 3. If you are testing for 3 conditions, you would need ____IF statements.

A. 1 B. 2 C. 3 D. 4

A is incorrect. A single IF statement would allow you to test for a single true and a single false (2 conditions). B is correct. Two nested Ifs would allow you to test for 3 conditions. Nested Ifs test the first condition and if that is true, the function stops. If the first condition is not true, Excel goes on to the next test. If that 2nd condition is not true, then it assumes everything else falls into the 3rd condition. C is incorrect. You do not need 3 IFs to test for 3 conditions. You only need 2. You would only nest 3 Ifs together if you wanted to test for more than 4 conditions. D is incorrect. 4 IF statements would require that you are testing for more than 3 conditions.

Page 54: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 54

4. If you wanted Excel to display a blank or empty cell as part of an IF calculation, you would

type______________in the function. A. “space” B. “blank” C. “ “ D. Empty

A is incorrect. If you typed “space” then the word space would actually be typed. B is incorrect. If you typed “blank” then the word blank would actually be typed. C is correct. There is an empty space between the quotations and that is what will display in the cell. D is incorrect. Typing empty without quotation marks will result in an error message. Text needs to be within quotations when used with an IF. 5. A/an ___ IF is the term used when you use an IF with a different type of function.

A. Nested B. Embedded C. Conjoined D. Looped

A is incorrect. Nested is generally used to show that an IF is combined with another IF. B is correct. Embedded is used to describe combining an IF with a non-logical function such as a lookup or information function. C is incorrect. Sorry- I made it up – no such term. D is incorrect. Sorry- I made it up – no such term. 6. AND/OR tests are logical functions that can test up to __conditions.

A. 10 B. 20 C. 30 D. 40

A is incorrect. AND/OR can test more than 10 conditions. B is incorrect. AND/OR can test more than 20 conditions. C is correct. AND /OR can handle up to 30 conditions. D is incorrect. AND/OR cannot handle more than 30 conditions. 40 would be too many. 7.If you want to add up a group of numbers if a certain condition is met, you should use

A. ADDIF. B. SUMIF. C. IFSUM. D. COUNTIF.

Page 55: Decision-Making Functions in Excel

Decision-Making Functions in Excel

Page 55

A is incorrect. Sorry – I made it up – no such function B is correct. SUMIF is a math and trig category. It tests the cells for a specific condition and if that condition is met, it ADDS up the specified cells. C is incorrect. The name of the function is SUMIF … not IFSUM. There is no such function as IFSUM D is incorrect. COUNTIF and SUMIF are similar but COUNTIF counts. It does not add or sum. 8. If you want to count a group of numbers, if a certain condition is met, you should use

A. COUNT. B. SUMIF. C. IFCOUNT. D. COUNTIF

A is incorrect. COUNT would count all the specified numbers but it would not test to see if specific conditions were met. B is incorrect. SUMIF does not count cells. C is incorrect. IFCOUNT is a function I made up. It does not exist. D is correct. COUNTIF counts cells meeting the specified criteria 9. The functions called the Plurals test for up to ____ conditions.

A. 30 B. 67 C. 100 D. 127

A is incorrect. The plurals such as SUMIFs and AVERAGEIFs can test for more than 30 conditions. AND/OR functions can only test for up to 30 conditions. B is incorrect. I made this number up. The Plurals can handle more than 67 conditions. C is incorrect. I made this number up. The Plurals can handle more than 100 conditions D is correct. AVERAGEIFS, COUNTIFS, SUMIFs as well as MAXIFs and MINIIFs can test for up to 127 conditions. However, the tests are all based upon the first condition. In other words, it can test if Customer A had purchases greater than 100 and if the products were pink, however, it could not test to determine if Customer A had purchases greater than 100 and also test to determine if Customer B had purchases greater than 100 and if the product was pink.