COS213 Assignment #11 Name ___________________________
Due: Friday 12/13/13 @ 4:30 pm
There is no late due date.
Papers should be left in the drop box outside 131 Neville.
Part I: (30 pts.)
1. Which statement is not true about Excel macros?
a. Recorded macros are stored as VBA Functions.
b. A macro is a sequence of VBA statements, often used to automate a task.
c. A macro can be recorded using the Macro Recorder or can be written manually in the VBA Editor.
d. Once recorded, the code for the macro can be edited using in the VBA Editor.
2. Which statement is true about macro security in Excel?
a. A macro from an unknown source could contain malicious code.
b. A workbook containing macros is saved using the .xlsm extension.
c. The default setting in Excel is to disable macros until enabled when the workbook is opened.
d. Statements a) – c) are all true about Excel macros.
3. Once you begin recording a macro, all keystrokes are recorded until the Stop Recording button is
4. Once a macro is recorded, how can it be executed?
a. The user can use the assigned shortcut key sequence.
b. The user can use the Developer / Macros command, select the macro, and click Run.
c. A button can be placed on the worksheet assigned to the macro and the user can click the button.
d. All choices a) – c) are possible ways to execute a macro.
5. Assume a macro is recorded using absolute cell references. In the last step of the macro the macro
writer clicks in cell A1. When this macro executes from any cell in the workbook it will always select
cell A1 as the last step.
6. A user-defined Function is shown below. It is passed the grams of fat in a food item and returns the
number of calories associated with the value. There are 9 calories per gram of fat. Which statement is
not true about this Function?
Function FatCalories (food)
FatCalories = food * 9
a. The result of function call: =FatCalories(5) is value 45.
b. The FatCalories function has one parameter so must be passed one argument value.
c. Assume cell A1 is empty and cell A2 contains formula =FatCalories(A1). The FatCalories function
returns an error.
d. The user could click in cell A1 of a worksheet, issue the Insert Function command and select the
FatCalories function from the User-defined category.
7. A user-defined Function is shown below. What is the result of: =OverTime(45,10)
Function OverTime (hours, rate)
If hours > 40 Then
OverTime = (hours-40)*rate
OverTime = 0
d. This Function generates a #VALUE! error message.
8. Which statement is not true about the user-defined Function seen below?
Function Mystery (range)
Mystery = WorksheetFunction.Small(range,1) + WorksheetFunction.Large(range,1)
a. The function could be called as in: =Mystery(A1:A10).
b. It returns the sum of the top two largest values in the provided range.
c. It returns the sum of largest and smallest values in the provided range.
d. If the function is called as =Mystery(A1) and cell A1 contains value 5, the function returns value 10.