Вы находитесь на странице: 1из 9

Excel Tutorial (Prof.

Lhost)

301124878

Spring 2015

Excel Final Assignment


Due: Wednesday, June 10, 2015 by 5pm to Moodle
I cannot accept any work after this deadline (the end of the exam period).
To avoid getting a zero on this assignment (and failing the course), make
sure to submit your file before this deadline.
TIP: As you work through this assignment, save and backup your file often.
There is absolutely no excuse for not doing this. My file was
lost/destroyed/corrupted/etc is not an excuse for not being able to hand it in
because you should never lose more than maybe 30 minutes of work, at most, if
you are backing up properly as you work. Be sure to back up remotely (e.g., email,
Dropbox, OneDrive) as well.
If (and only if) you are enrolled in the VBA option, you are required to complete the
VBA section.
You will be graded on the accuracy of your work. There may be several correct
answers, but there are many wrong answers. Follow all directions. (E.g., if it asks for
one formula for 3 columns, your answer needs to be one formula. The ability to find
general solutions is a key ability you need to demonstrate.)
To be clear, fail this assignment and you will fail the course. Get 100% on
this assignment and you can earn an A for the course. (Of course,
performance somewhere in between will earn you a grade somewhere in
between.)
Working through the problems collaboratively is acceptable if you find it beneficial
to bounce ideas off of a classmate. However, you are required to submit your own
file to demonstrate your learning.
You have learned many skills throughout this course. This includes the obvious, the
new technical Excel (and VBA) skills you have acquired each week. Before the start
of the tutorial, 75% of you reported being more likely than not to use your phone as
a calculator to enter a value into Excel. 80% of you had basically no knowledge of
string or database functions. These functions are fundamental to doing any sort of
data analysis in Excel. You now should be able to apply them in a variety of
contexts.
In the process of acquiring these technical skills, you have also learned a few
fundamental concepts from an introductory computer science course. You have
learned about functions and logical comparisons. String manipulation is commonly
taught in introductory computer science because not only is it a valuable technical
skill, but it also develops this method of thinking. Something as seemingly simple as
extracting the various components of a persons name require you to identify
abstract patterns in data and develop a flexible solution for names that may come
in different formats. In general, thinking through the solution to a problem in a way
that allows you to write formulas or code to find the solution is a valuable skill.
Through this course you have hopefully become better at solving problems. A liberal
arts education is about developing a toolkit you can apply to a variety of situations.
The broader the tools in your toolkit, and the more flexibly you are able to apply
1 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

these tools and acquire new ones on your own, the more success you will have in
whatever it is you go on to do.
In this final assignment, you will apply not only the technical skills you have
acquired, but also these broader problem-solving skills. It should be challenging, but
nothing you cannot handle. When you encounter something you do not know how to
do, use these new skills to find the solution. When you successfully complete the
assignment, you will have accomplished learning beyond a basic introduction to a
software program. You will be equipped to process data in a variety of settings and
to make contributions in your future work well beyond what you were capable of
contributing before. This assignment will allow you to demonstrate all of these skills.

Setup
After graduation you have taken a job in the marketing/development department of
a medium-sized citys symphony orchestra. The Excel workbook contains data on
membership donations. Without these donations, your orchestra will cease to exist,
so properly analyzing this information is essential to the organizations future (and
thus yours with the organization). Whatever future job you find yourself in,
particularly if you work for any type of small business, non-profit, or government
agency, being able to work productively with this type of data will make you a more
attractive employee.

Overview of Workbook and What You Are To Do


The workbook has 7 worksheets. Some of them contain data or other information.
Some of them require you to write formulas.

Color Legend
This worksheet is a description of the color-coding used throughout the workbook.
Gray is Data. Green and Orange are for formulas you need to fill in. Orange columns
refer to groups of columns that all get the same formula, as do pink (both are
required to distinguish contiguous groupings). See this worksheet for additional
details and to see the colors.

Member Donation History


This worksheet is data. It contains a list of your 1000 members. Each member is
uniquely identified by their email address. There is also an ID that will be used for
on the Member Report worksheet.
For each member, the worksheet contains the date since which the member has
been an active member and the members yearly donation history from 1995 until
2013.

Member Musician Contact


This worksheet is data. It contains a list of members and the initials of the musician
associated with the member. It is common in non-profit organizations for specific
members to be designated for special contact from a specific individual within the
organization. For example, a musician might be designated as the contact for all
members who are known to have children at the same school as that musician.
2 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

Current Donations
This is the first worksheet in which you will write formulas.
Columns A through D contain data (the gray columns).
Columns E through N are all light green. This indicates that each column requires a
separate formula. For each of these columns, you should be able to write one
formula in row 2 and copy/paste (or fill down) that formula down to the bottom row.
However, no formula can be copied/filled-right into other columns.
Columns E, F, and G require string manipulation. Using the email address in column
A, you must extract the first name, middle initial (MI) for email addresses that have
one, and last name. It is likely easiest to build the formulas in steps using other
columns and then combine them together into single formulas for each of columns
E, F, and G. If you insert columns to do this, just delete them when you are finished,
preserving the structure of the workbook as it is now.
Column H requires a VLookup() to find the date of first membership from the
Member Donation History worksheet.
Column I requires subtracting the donation date (column B) from 5/25/2015. Look
back to our first string manipulation workbook for how to make a string date (text
representing a date) an actual date value you can use for subtraction.
Column J requires dividing the number of days by 365 and rounding down to the
FLOOR().
Column K requires doing a VLookup() to find the Musician Contact Initials from the
Member Musician Contact worksheet. If no musician contact initials are found, it
should say no musician contact instead of the #N/A error message. Remember
what you learned about handling errors (e.g., see the string manipulation practice
workbook).
Columns L through N are used to write the basic parts of a form letter (a very
common task in non-profits, and in many businesses). Make sure you match what is
in the worksheet (the first 10 rows that I left in to show you what your formulas
should produce). The idea is that you want to use these fields directly in a letter. So,
the punctuation and everything else need to be correct.
Column L is the salutation, built using text (e.g., Dear), punctuation, as well as the
first name, middle initial (if appropriate), and last name you found in columns E, F,
and G.
Column M thanks the member for their donation, specifically mentioning the
amount (some members need this as a receipt for tax purposes when donating to a
non-profit). You can format the donation amount using the Text() function. You can
get the format_text by looking at the Custom category of the Number tab of the
Format Cells window for a cell that is formatted the way you want it to be displayed.
(For example, if you want to display a number as a percent with two decimal places,
format a cells so that it looks like this, then from the cell, do Format Cells, Number,
then click on Custom to see that this has format_text of 0.00%. If the number
value you want displayed this way is in A1, this would look like TEXT(A1,0.00%).)
Column N requires more formatting of numbers using Text() and combining them
with text. You should only display this message if the person has been a member for
greater than or equal to 5 years.
3 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

Graph
This worksheet requires some formulas, and then the creation of two graphs.
Column A has data, specifically the email addresses of members.
Columns B, C, and D are all shaded orange, indicating that they are a group that
requires a single formula. They require a VLookup() from the Current Donations
worksheet. However, in order to have one formula for all three columns, you must
use the Match() function for the col_index_num argument of the VLookup(). In this
way, you should be able to type one formula into column B and the copy/paste (or
fill down and right) it into all rows of columns B, C, and D. Remember your cell
reference $s. With most VLookup() formulas, you can also use Index() and Match().
When you copy/paste your formulas to the other columns (e.g., from B to C and D),
make sure not to change the formatting (e.g., the value $25 should not be
formatted as a date).
Column E requires you to use the Month() function to extract the month from the
donation date.
Columns F, G, and H are another grouping that requires a single formula. Match the
designation (i.e., General, Talent, Building) in column D with the column heading in
F2, G2, and H2 to put the donation amount if the donation has that Designation and
a $0 otherwise. Remember your cell reference $s.
Column K has data. It has the dates from 1/1/2014 to 12/31/2014 used by columns
L, M, and N. The last 3 rows (rows 368, 369, and 370) have #N/A, which will be used
in columns T through Y.
Columns L, M, and N are another grouping that requires a single formula. They
should have the total donations for that designation for that date. That is, use
SUMIF() to add up the donations made by all members on that date for the
corresponding column. The designation (i.e., General, Talent, Building) in column D
needs to match the designation in the column heading L2, M2, or N2. However, you
dont do this by referring to the designation directly in the formula. Rather, just let
the columns line up correctly. By this, I meant that you can simply refer to column F
for the column L SUMIF() formula and let it refer to columns G and H as you fill right
to columns M and N. The matching done in the SUMIF() is based on the dates.
Columns P and Q have data. They are a list of the 3 membership mailing solicitation
mailings, and the Designation (category) focus for each mailing.
Column S has data. It has the dates from 1/1/2014 to 12/31/2014 used by columns T
through Y. Note that this column includes three additional dates at the bottom (rows
368, 369, and 370). These dates are 3/1/2014, 7/1/2014, and 11/1/2014. These are
the three dates that mark the start of the three solicitation campaigns.
Columns T, U, and V are another grouping that requires a single formula. You should
check if ISNA() of column K is true (e.g., ISNA(K3)). If it is, put NA() (so that the #N/A
error appears). If column K has a date (ISNA() is false), the formula should return the
cumulative sum. The cumulative sum uses the SUM() function with a range between
the first row (row 3, corresponding with 1/1/2014) and the current row. To do this,
lock the first row but let the final row change. (E.g., if you have SUM(A2:A5), you
want the 2 to stay a 2 but what the 5 to be the current row. Also, SUM(A1:A1) is
perfectly valid.) Also let the columns change so that you can write this formula in
4 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

column T referring to the sum of column L and then fill this to the right into columns
U and V, referring to columns M and N.
Columns W, X, and Y are another grouping that requires a single formula. These
three columns are used to put the vertical lines at the date of the three solicitation
mailings. These are the columns have #N/A unless the date matches the date in row
1 (one of the 3 mailing solicitation dates). If the date matches AND if ISNA() is true
for column V, put the max of all the values in T3:V367 plus 10% (multiply the max
by 1.1). If the date matches and ISNA() is false for column V, put a 0. Note that it is
sometimes ok to use a blank () instead of NA() to achieve this sort of thing in a
graph. However, sometimes NA() works when doesnt, so I generally work with
NA() instead of . Also, if someone looks at the worksheet later and sees a bunch of
what look like blank columns, they might delete them. If they see a bunch of #N/A
errors, they might look to see whats going on but are less likely to delete them.
Next, in the space from columns Z through AJ, put in a graph that looks like this:

To do this, you need to select the data in columns S through Y and insert a Line
Chart (Line). Format it to match the graph above. The number format for the x
axis is mmm. The colors are red RGB(255,0,0), blue RGB(0,255,0), and green
RGB(0,255,0). You can type the title directly into the graph.
As a side note, I want to comment on this type of graph. This type of graph is quite
common. Non-profits launch some sort of campaign and want to see how successful
it was (or a business launches a new product and wants to track sales of all their
products, or a business launches an advertising campaign, etc...). There were three
mailings. The General Fund Mailing on 3/1/2014 appears to have successfully
increased donations designated as General, as well as slightly increasing donations
to Talent and Building. The 7/1/2014 Talent Mailing clearly increases donations
designated for Talent. The 11/1/2014 Building Mailing seems to have been a
5 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

bust. Next year, this organization might want to rethink this solicitation campaign.
Perhaps people do not want to donate for building upkeep as much as for talent
retention/attraction or general purposes. Or, perhaps any solicitation in November
will not do as well as those at other times of years. Because the organization is
limited in how many mailings it can send in a year (both because mailings are
expensive and because sending too many may turn people off from the
organization), determining how to optimally solicit donations is important. This type
of analysis can help with that task.
As for the setup of the graph, it might seem silly to have a single formula with all
the NA()s. However, try changing the date of one of the mailings in column P (say,
change the 3/1/2014 to 4/1/2014...make sure its 2014, not 2015!). What you should
see is the vertical line on the graph change to the new date automatically. This
makes it easy to re-use this worksheet as a template for future analysis.
Back to work...
Column AL has data. It has the numbers 1 through 12, corresponding with months
January through December. This is used by columns AM through AP.
Columns AM through AO are another grouping that requires a single formula. These
are a SUMIF() that matches the donation month in column E with the month in
column AL. The sum is over columns F, G, and H for the formula in columns AM, AN,
and AO, respectively.
Column AP is simply the sum of columns AM through AN.
Column AR is Data. It is a repeat of column AL.
Column AS is a dynamic column referring to either column AM, AN, AO, or AP. First,
in cell AS2, use Data Validation to create a dropdown list from which you can select
the column headings found in AM2:AP2 (I would de-select Ignore Blank because
otherwise you will get errors if this cell is in fact left blank). This should give you the
little arrow thing to the right of the cell to lets you select from the list. Then in
AS3:AS14, use a VLookup( to find the values in columns AM3:AP14, using a Match()
to select the appropriate col_index_num (or use Index() and Match()).
Next, in the space after column AU, put in a graph that looks like this (note that it is
shown for Total, but it could also be for General, Talent, or Building):

6 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

To do this, you need to select the data in columns AR through AS and insert a
Scatter Chart (Scatter with Straight Lines and Markers). Format it to match the
graph above. I did not change the default line or markers, so you can just leave
them as the default. Format the x axis to be between 1 and 12, but leave the y axis
as is so that it changes dynamically when you change cell AS2. I deleted the legend.
The title is a formula referring to cell AS1.
If you are doing the VBA option, you will return to this chart in the final section
(named VBA).

Member Report
This worksheet has the basis of what a common report might entail. It has
donations listed by year for each member (actually just the first 250 since all 1000
members would be 20,000 rows).
Cell A2 is data. It should have the value 1.
Cell D2 is also data. It should have the value 1995.
Start with column D. D2 through D5001 should have the years 1995 through 2014,
repeating. Write a single formula starting in cell D3 to fill in this repeating series
(note that this should be a formula, not generated by some other built-in Excel
method of repeating sequences).

7 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

Next move to column A. Leave the 1 in A2. From A3 to A5001, fill in the ID 1, 2,
3, ..., 250, so that each ID is associated with a set of years (1995 through 2014, as
found in column D).
Columns B and C are another grouping that requires a single formula. They should
be a VLookup() from the Member Donation History worksheet. Note that the
column heading in C says Member Since, which is different from the column
heading in the Member Donation History worksheet (which is Active Member
Since). Thus, Match will not work. Instead, use the COLUMN() function. Since both
what you are looking up and where you want it returned are in the same columns (B
and C, or 2, and 3), this will work. Be careful with this approach because it is not
robust to later column changes. That is, if you later inserted a column in this report,
you would no longer be returning the correct data. However, you should know about
the COLUMN() function (and ROW() function), so Im having you do this here.
In column E, write a formula to find the donation for that member for that year. The
donations for 1995 through 2013 come from the Member Donation History
worksheet. You can use VLookup() based on the ID and then use Match() to find the
column corresponding with the correct year. For 2014, you can use VLookup() to find
the donation from the Current Donations worksheet.
If you are doing the VBA option, you will return to this report in the next section
(name VBA).
If you are not doing the VBA option, this completes your assignment.

VBA
If you are doing the VBA option, you are required to complete this section. If you are
not doing the VBA option, you do not need to do this section (but, if you would like
to try, I encourage you to do so!)

Graph Worksheet
In previous steps, you put a data validation drop down list in cell AS to control the
data in AS3:AS14 and thus the data displayed in the graph to the right of that
column. You should use VBA code to dynamically change the graph. To do this, I
went to the Excel Workbook used in the classes on graphing. Those contained
similar VBA code. We assigned keyboard shortcuts to incrementLaw() and
decrementLaw() that increased and decreased the law shown in the graph. Start by
copying and pasting all of that code into the VBA module here. Then do a find and
replace, finding Law and replacing it with Cat.
Then, on the worksheet, assign the name rngCatList to the column headings in
AM2:AP2 and the name rngCurCat to the dynamic selector cell AS2.
Then modify the VBA code so that incrementCat() and decrementCat() work
(remember, these were incrementLaw() and decrementLaw() before you did the find
and replace). Only 3 changes are required to make it work. Identifying these
changes may not be easy at first. Focus on what each part of the code does and try
various changes until it works. Stepping through the code line by line might be
helpful (F8 in Windows, I believe command-shift-I on Mac).

8 of 8

Excel Tutorial (Prof. Lhost)

301124878

Spring 2015

Assign incrementCat() and decrementCat() keyboard shortcuts Ctrl-Shift-W and CtrlShift-Q, respectively (or a close equivalent on Mac). You should be able to run these
keyboard shortcuts and have the graph update accordingly (stepping from General,
to Talent, to Building, to Total for incrementCat(), and in reverse for
decrementCat()).

Member Report Worksheet


Start by running the removeShadingAndLines() procedure to remove all shading and
lines from this worksheet. Note that you can use this procedure to clear out shading
and lines at any time (e.g., when you are writing your code and it does not work
properly at first).
Then, fill in the remainder of the ShadeAndAddLines() procedure. The basic idea of
what you should do is this:
Loop through each row, checking for when there is a change in member. Put a thick,
solid, black line to separate different members.
As you loop through each member, count how many years they have donated. If the
member has donated 15 or more years, shade all years with donations green. If the
member has donated 10 or more years (but not 15 or more), shade all years with
donations red. If the member has donated 5 or more years (but not 10 or more),
shade all years with donations blue.
Comments in the code explain the general outline of what you should do.
Remember that writing code is not something you are likely to get correct the first
time. I rarely do and I have been doing this for many years. Perfection on the first
try is not the goal. Rather, write a small part of the code and then try running it to
see if it works. If it doesnt, fix it. Once it works, go on to the next part. This is a
much better process than trying to write it all and then trying to figure out which
parts are wrong. A few additional tips:

Remember you can also use things like MsgBox() to give you updates on what
the code is doing.
You can also write to other cells on the worksheet. For example, column F is
empty. Try writing the counter to this column in the current row as you go.
This way you can see exactly what the counter value is and fix any issues
with this counting. Just be careful not to write on top of anything you dont
want to get rid of (another reason to backup before running any code).
When looking through cells, dont have it loop through all rows until you have
it working. Just have it loop through a small portion so you can test it.
As always, back it up frequently and especially before you run any code.

9 of 8

Вам также может понравиться