COS 211 Lecture 11: COS213Assg11

17 views6 pages
Published on 16 Feb 2016
Course
Professor
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
clicked.
a. True
b. False
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.
a. True
b. False
1
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
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
End Function
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
Else
OverTime = 0
End if
End Function
a. 0
b. 50
c. 450
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)
End Function
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.
2
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.