In this project, you complete calculations for Perfect Vacation Rentals using Database and Logical functions. File Needed: PerfectRentals-06.xlsx (Attached to this project) Completed Project File Name: [your initials] Week09Practice01.xlsx Open PerfectRentals-06.xlsx  save it as [your initials] Week09Practice01. Build a DAVERAGE function using the Function Arguments dialog box. Click the Rate Info sheet tab and select cell C38. Type mi and press Enter. Criteria is not case sensitive. Click the Name Box arrow and select List. This range includes cells A4:F28. Click cell D30 and click the Insert Function button in the Formula bar. Click the Or select a category drop-down list and choose Database. Select DAVERAGE and click OK. Press F3 (FN+F3) in the Database box to open the Paste Name dialog box. Choose List and click OK. Click the Field box and type rate. Entries are not case sensitive. Click the Criteria box and select cells C37:C38. Quotation marks are entered for the Field argument (Figure 6-13). If quotation marks are not automatically entered around rate, go ahead and enter them manually. Figure 6-13 DAVERAGE and its arguments Click OK. The average rate for Michigan is 375. Select cells D13:D16, the rates for properties in Michigan. Compare the results in the AutoCalculate area in the Status bar to cell D30. Build a DCOUNTA function using the Function Arguments dialog box. Select cells A37:D37 and copy them to cells A40:D40. Select cell C41 and type mn and press Enter. This criteria will find properties in Minnesota. Click cell D31 and click the Insert Function button in the Formula bar. Click the Or select a category drop-down list and choose Database. Select DCOUNTA and click OK. Press F3 (FN+F3) in the Database box to open the Paste Name dialog box. Choose List and click OK. Click the Field box and type 1 to use the first column. Fields (columns) are numbered from left to right. You can count data in any column for this task. Click the Criteria box and select cells C40:C41 and click OK. The result is 3. Type a DMAX function. Select cells A40:D40 and copy them to cells A43:D43. You must use separate criteria for each Database function on this sheet so that you do not alter existing results. Select cell D32. You are deliberately omitting the criteria at this point. Type =dm to display the Formula AutoComplete list. Press Tab to select DMAX. The database argument is first. Type a lowercase L (l) to open Formula AutoComplete again. Range names display with an initial uppercase letter and the range name icon. Double-click List (Figure 6-14). Figure 6-14 DMAX and Formula AutoComplete Type a comma (,) to move to the field argument. Type “rate” including the quotation marks. Type a comma (,) to move to the criteria argument. Select cells C43:C44 (no criteria yet) and press Enter. The top rate in Indiana appears to be 575. Select cell D32 and click the Trace Precedents button [Formulas tab, Formula Auditing group]. Select cell C44 and type in and press Enter. The result in cell D32 is now 375. Click the Remove Arrows button [Formulas tab, Formula Auditing group]. Select cells D7:D9, the rates for Indiana. The DMAX function ignores cell D8 because it is currently recognized as text. Create an IFERROR function. Select cell E5. The formula is =D5/$D$34 to divide the rate by the industry average rate in cell D34. Click the Formula bar and select D5/$D$34, omitting the equals sign (=). Press Ctrl+C to copy the formula to the Clipboard (Figure 6-15). Figure 6-15 Copy the formula in the Formula bar Delete the contents of cell E5. Make sure to leave the equal sign Click the Logical button [Formulas tab, Function Library group] and choose IFERROR. Press Ctrl+V to copy the formula in the Value argument box. If you copied the equals sign (=), delete it now. Click the Value_if_error box. Type Verify all rates. including the period. If the formula results in an error, your message displays instead of a standard error value message (Figure 6-16). Figure 6-16 IFERROR Function Arguments dialog box Click OK. There is no error in cell E5, so your custom message does not display. Copy the formula in cell E5 to cells E6:E28. AutoFit column E. Select cell D8, type 450, and press Enter. The error message no longer displays. Select cell D32. The DMAX function recalculates the top rate for Indiana (Figure 6-17). Figure 6-17 Error message when needed Create an IFS function. (If your version of Excel does not include IFS, build this nested IF function =IF(E5>100%,“Above”,IF(E5=100%,“Even”,“Below”)). The second IF statement is the value_if_false argument for the first IF function.) Select cell F5, click the Logical button [Formulas tab, Function Library group], and choose IFS. Select cell E5 and type >100% in the Logical_test1 box. Click the Value_if_true1 box and type Above. If the percentage in cell E5 is greater than 100%, the formula displays Above and no additional logical tests are run. Click the Logical_test2 box, select cell E5, and type =100%. Click the Value_if_true2 box and type Even. If the percentage in cell E5 is 100%, the formula displays Even and no more logical tests are run. Quotation marks are automatically inserted when you use the Function Arguments dialog box. If double quotation is not automatically added, go ahead and add them manually (Figure 6-18). Figure 6-18 IFS function Click the Logical_test3 box, select cell E5, and type <100%. Press Tab, click the Value_if_true3 box, and type Below. If the percentage in cell E5 is less than 100%, the formula displays Below. Click OK. Increase the indent two times for cell F5. Copy the formula in cell F5 to cells F6:F28. Press Ctrl+Home (Figure 6-19). Figure 6-19 IFS function results Type an AND function. Select the Deposits sheet tab and click cell D4. Type =an and press Tab to start the function. Type b4=“y” for the logical1 argument. This tests if cell B4 displays a “y.” Type a comma (,) to move to the logical2 argument. Type c4=“y” for the logical2 argument. This tests if cell C4 displays a “y.” Press Enter. The closing parenthesis is provided and the first result is TRUE. Type an OR function. Select cell E4. Type =or and press Tab. Select cell B4 and type =“y” for the logical1 argument. This tests if cell B4 displays a “y.” Type a comma (,) to move to the logical2 argument. Select cell C4 and type =“y” for the logical2 argument. This tests if cell C4 displays a “y.” (Figure 6-20). Figure 6-20 OR function with two logical arguments Press Enter. The closing parenthesis is provided and the first result is TRUE. Select cells D4:E4 and double-click the Fill pointer. Nest AND and IF functions. Select cell F4. If both amounts have been received, the formula will display “Both” in the cell. Otherwise, the formula will display “Not yet.” Click the Logical button [Formulas tab, Function Library group] and select IF. The Logical_test argument is the AND function. Click the Name Box arrow and select AND. (If AND does not appear in the list, select More Functions and navigate to and select AND.) The Function Arguments dialog box now represents AND and the Formula bar displays the nested elements so far. Click the Logical1 box and select cell B4. Type =“y” after B4. Click the Logical2 box and select cell C4. Type =“y” after C4. Now you are ready to return to the IF function (Figure 6-21). Figure 6-21 AND function as logical test for IF Click between the I and F in the function name “IF” in the Formula bar. The Function Arguments dialog box now represents IF. Click the Value_if_true box and type Both. Click the Value_if_false box and type Not yet (Figure 6-22). Figure 6-22 Nested AND with IF Click OK or press Enter. Increase the indent two times for cell F4. Copy the formula to row 38. Create a SWITCH function. (If your version of Excel does not include SWITCH, use the nested IF function =IF(C5=“il”,“Illinois”,IF(C5=“in”,“Indiana”,IF(C5=“ky”,“Kentucky”,IF(C5=“mi”,“Michigan”,“Where?”)))). The value_if_false argument is a nested IF for the next state until you complete Michigan; then the value_if_false argument is Where?). Click the Switch sheet tab and select cell D5. Click the Logical button [Formulas tab, Function Library group] and choose SWITCH. Click cell C5 for the Expression argument. Click the Value1 box and type il. Click the Result1 box and type Illinois. If cell C5 displays “il”, “Illinois” displays in cell D5. Click the Default_or_ value2 box and type in (Figure 6-23). Figure 6-23 SWITCH function Click the Result2 box and type Indiana. Complete the arguments as shown here. Press Tab to move quickly from one argument box to the next. Default_or_value3 ky Result3 Kentucky Default_or_value4 mi Result4 Michigan Default_or_value5 Where? Click OK when the arguments are complete. Copy the formula to row 16. Select cell C16 and type WI and press Tab Save and close the workbook (Figure 6-24)