Uploaded by bernieboy

CP212 Assignment 1

advertisement
Assignment 1
Due: Monday October 4, 2021, at 11:30 pm
Note: This assignment requires NO VBA code. You can complete Part A simply by editing a spreadsheet
in Excel. In Part B you simply record a macro but writing code is not necessary.
Part A
Imagine that you work as a data analyst for a large company. The regional sales manager has asked you
to create a spreadsheet for Anila the sales rep to keep track of her daily sales totals and track how much
she should sell to reach her goal.
Create a spreadsheet application for Anila that:
❖ has a worksheet called Main which will be the first sheet displayed when the spreadsheet opens (no
code required).
❖ includes a cell on the Main worksheet where Anila can enter her full name which has a Named Range
called SalesRepName.
➢ the only thing on the Main worksheet should be her name in the SalesRepName cell and a textbox
with instructions on using the application.
❖ allows her to input dates and sales amounts on a worksheet called Input Data.
❖ also displays the running total beside each daily entry.
➢ Use daily entries for a month, so you only need to copy the equations down to 31 rows.
❖ contains a worksheet called Dashboard which contains:
➢ a cell where she can enter her goal for the month.
➢ a cell which displays her total sales.
➢ a cell which displays the % of her goal she has achieved.
➢ a Bar Chart (not a column chart) displaying two horizontal bars: one for her goal and one for her
current sales.
Make sure to:
❖ use Cell Styles to indicate which cells contain calculations, and which cells should be changed by the
user.
❖ protect both worksheets so that Anila can enter values where she needs to but can't delete the
formulas (but don't put a password on it to make it easier to mark).
❖ make the Main sheet active before saving the file, which ensures it will be the first one displayed when
the application is opened.
❖ validate the input data to be sure the input goal value won’t cause an error in the calculation.
Rubric:
•
•
•
•
•
Instructions [2]
Formatting [2]
Worksheet protection [2]
Data validation [2]
Bar chart [2]
Examples for Part A:
Your assignment doesn’t have to look like this, but it should be similar:
Figure 1: The Main worksheet
Figure 2: The Input Data worksheet
Figure 3: The Dashboard worksheet
Tip: If you use $ values for your horizontal axis, it can get crowded. I’ve set mine to be displayed in
Thousands by right clicking the horizontal axis (the x-axis) and choosing Format Axis:
Figure 4: Formatting the x-axis to Thousands
Part B
In Part B you will record a macro while essentially duplicating the Main worksheet step-by-step (with a
few extras thrown in), then stop recording the macro.
Assign a shortcut key ctrl+m to run this macro.
Before starting recording, create a new worksheet, and rename the worksheet as New Main. Make sure
the rest of these steps are performed on the new worksheet.
Record a macro that contains the following steps:
1)
2)
3)
4)
5)
6)
7)
8)
9)
Type the word “Sales Rep.:” in cell A1.
Format cell B1 using the Cell Style called Input.
Name that cell as SalesRepName2 (otherwise it will conflict with the name already created).
Unlock the SalesRepName2 cell.
Type the word “Enter your name” in cell A2.
Copy the word in A2, paste it into A4.
Press the Escape key (to remove the dotted marquee around the cell).
Protect the worksheet.
Stop the macro recorder.
After you record the macro, save your file to ensure everything is done before making any mistakes.
Rubric:
•
•
Macro recorded [2]
Shortcut key assigned [1]
Download