Spreadsheet Workshop 2017
Spreadsheet Workshop 2017
Contents
Challenge Extensions
Completion Checklist
Spreadsheet Workshop
Part I: Graphing correlative data
Open your “master spreadsheet” in Google Classroom. With this spreadsheet, you’ll be creating
a plot of temperature throughout the day.
● Title column A “Time” and fill in the first few cells in the column with times of day.
○ Start with a time in the morning, then go up by hour intervals
○ After you have a few times entered, highlight those cells. Then drag the box
down through the column so the spreadsheet will automatically fill cells with 9-10
consecutive times.
● Before you move on, read the Completion Checklist to make sure you’ve completed
everything. You should have four graphs with a complete sentence next to each one.
Spreadsheet Workshop
Spreadsheets are great for not just organizing data, but analyzing it. Here, we’ll start with some
basic programming to make your spreadsheet do arithmetic for you. Create a new “sheet” using
the + icon in the lower left and title it “simple calculator.”
● Pick any cell and type in a basic math expression, like 12+5. Notice that the text itself
shows up in the cell, not the answer. Click on the cell again so you can edit the
expression, and enter an equal sign at the beginning of it e.g. “= 12+5” You just wrote a
computer program!!
○ Can you figure out what keyboard characters represent multiplication and division?
This is great, but you can’t see what calculation you made unless you click on the cell and see you code.
Furthermore, you have to go back and edit the code if you want to add other numbers. Let’s take this to
the next level.
● In cell A3, enter the number 12.
● In cell B3, enter the number 5
● In cell C3, start a formula by typing the equals sign. After you have the sign, you’ll see a little
grey underline next to the cursor. This is because the
computer is expecting you to tell it to do something. So now
type in “A3.” Then type the plus sign. After the plus sign.
Click on cell B3 and it should automatically enter “B3.” Hit
enter to leave the cell.
Goal: make calculators that will solve specific types of problems
A fairly simple type of problem involves the following equation relating distance, time, and
speed: d = s · t. We’ll make a special calculator to solve these problems for us.
● Create a new “sheet” using the + icon in the lower left.
● Create a table with headings of Time, Distance, and Speed. Under Time, enter “.3
hours.” Under distance, type “2.9 mi” Under speed, enter a formula to calculate speed.
○ OOPS!!!! You probably got an error message. That’s because you’re trying to
divide both numbers and letters. Delete the units you typed in the cell and see if
the calculation works.
○ All numbers need units in order to have meaning. If units can’t go in the
individual cells, where could they go?
Now you have a speed calculator. Change up some of the numbers to check that it works.
Create 2 additional calculators of your choice. E.g. for time (given distance and speed) and
distance (given speed and time)
What are some other common formulas you could set up calculators for? Geometric properties
like area, volume and surface area? Cost with sales tax/discounts? What about other
calculator operations, like exponents, square roots, trigonometry, etc?
● Challenge: Use conditional formatting (under the ‘format’ menu) to make color change
depending on the values you are using. You can make cells different colors for positive/negative
values, or make them red when they’re blank so people know where to enter values.
Spreadsheet Workshop
● Before you move on, read the Completion Checklist.
Part IV: Graphing a function
● Consider the function y = 2/3x − 2.85 . We’re going to make a table of values for this
equation.
● A new “sheet” within the same spreadsheet (use the
+ icon at the bottom of the screen)
● On this sheet, title two columns x and y.
● For the x column, just type in values between -5 and
5.
● If you know what x is (-5 for example), how do you find y? What formula could you type
into cell B3 that would find y based on the x-value in cell A3 and the equation lined out
above? Enter this formula and drag the it down to fill in the y-column with values. Check
your values with those in my table below.
● All those decimal places sure are obnoxious, eh?
Highlight the y-column and click the “decrease
decimal places” button until you’ve got two decimal
places.
● Create a chart that graphs the equation on x and y
axes
Goal: Create a program that graphs a line based on the slope and y-intercept. These are both
considered “parameters” of the function. We want to be able to adjust the parameters quickly
and see how the graph changes.
For starters, let’s graph an equation in slope intercept form
● Create a new sheet with another table for x and y. Fill in the x values from -10 to 10.
● Make an additional table where you can enter a value for slope and another for the
y-intercept. Choose any values you’d like and plug them in.
● In the y-column of your table, enter a formula to calculate y using slope-intercept form.
Instead of typing in any numbers, use code to reference the cells where you’ve typed in
slope and intercept.
Try it out, does the
number change if you
change your value of
slope and intercept?
● Drag the formula down through the entire y-column. You’ll notice the column fills in with
zeros. This is because the program adjusted the input cells in the formula as you
dragged it down.
○ Life Hack: if cell J17 is part of a formula, it will change to J18, J19, J20 etc as you
drag it down. To tell the computer to keep that cell constant, lock it in using the
dollar sign: $J$17. Now it will stay as J17 in every formula. Do this every time
you are setting up adjustable parameters for a formula.
● Create a line graph based on your table of values
Spreadsheet Workshop
● Double-click on your graph and to bring up the chart editor. Select “Customize” → “axis”
● Set the domain to − 10 ≤ x ≤ 10 and the range to − 10 ≤ y ≤ 10 .
● Change the values of slope and intercept you have entered. Does it change the graph
accordingly?
● As you change the Slope and Intercept parameters, the graph window (minimum and
maximum values for x and y) probably keeps changing. If you right-click on the graph,
you can edit all sorts of its properties and add titles, labels, or limit the window.
Goal: In this stage, we’ll build an automatic invoice program for an automotive shop.
In addition to our normal math operations of +, -, *, and /, spreadsheets can do all sorts of
calculations. We’ll use a few of those as we create an invoice program for a car repair garage.
Invoices are like receipts, but generally have more detail. Create a table like the one below and
put borders around the headings. Enter a few items that might be part of a car repair.
Shoot! Our invoice needs to show some of our business information above the columns we
entered. There are a couple ways we can deal with this.
● One is to copy all our work and paste it lower on the spreadsheet.
● Alternatively, highlight the top six rows. Then go to >insert > insert 6 rows above. Ta
Daaaa!
● You can also insert rows or columns by right-clicking on the number/letter labels around
the margins.
● In the ‘cost’ column, you really need a formula that determines how much all four of your
brake pads are going to cost.
● We also need a formula to
calculate tax. But here’s the catch:
labor and parts are going to be
taxed at different rates for this
workshop. Hmm, sounds like
those might be parameters….
Make a little table somewhere that
you can enter tax rates into.
● Since tax rates come as percents,
you can select the cell and click the
“format as percent” button to make
things look good. You can also
Spreadsheet Workshop
format all monetary columns as currency.
Now, since we have two different tax rates, we need to have a way to distinguish between parts
and labor for each line item. That’s what the “Type” column is for. Right now, we’d have to type
in the word each time. But we can create our own drop-down menus in the program.
● Click on the first cell in your “Type”
column.
● On the menu at the top, click on
Data > Validation.
● Work with the box that shows up to
create your drop-down menu.
● Right now, it’ll only place the menus
in the cells you have selected. In
the box labeled “Cell Range”,
replace the single cell code with a
range of cells like E8:E13 instead
of just E8.
Okay, now you can quickly assign a category to each line.
That’s important because we want to apply a different tax rate
depending on what shows up in the “Type” column. Now for
your tax formula, we have to make that distinction. Time for
the =IF() function.
● In the first cell of your tax column, type “=IF( ”
● If you move your cursor around in the cell, you might
be able to bring up a somewhat cryptic help guide like
in my picture. Basically, this function involves three
elements separated by commas. The first is the
condition. Our condition is that the type of charge is
parts, so enter “=IF(E8 = “Parts”,”.
● After the comma, tell the program what to do if the
charge type is, indeed, Parts. (Hint: How do you calculate sales tax if you know the price and the percent?)
Then add another comma.
● After this comma, tell the computer what to do if the charge type is NOT parts ( if it’s not
parts, it’s probably labor, eh?)
● This step can be a little tricky, so just be patient and try a
few things to resolve errors. In computer programming, a
single typo can make the whole program fail and bring up
error messages.
Okay, one final thing. Our customers want to know how much they
have to pay. Make space so that we could add up to 10 line items.
Then label another box below the totals column for the invoice total.
In that cell, use the =SUM() command, which will add all the values
Spreadsheet Workshop
within a given range of cells. Type in =SUM(, then tell the program which cells you want to add
up.
Awesome! We just made a real tool that a real business could use to make their daily life
easier! Try it out. If you add another line item, does the total automatically update? What if you
change an item from parts to labor? What if you change the rate of sales tax?
Challenge: Google Sheets has thousands of programmed functions in addition to SUM and IF.
Can you program a cell to calculate total tax? Find the most expensive item? Find the average
cost of all Parts? Total cost of Labor?
The goal today is to publish your spreadsheet on your DP as a public tool for people to use to
make calculations and adjust the linear graphs you have created.
This is a more open-ended element of our spreadsheet workshop. Go through your sheets and
play around with some formatting options to make it visually attractive. Here are some key
options:
● Borders around cells
● Number format: you can set cells to have a certain number of decimal places, or show
times, percentages, dollar amounts, dates, etc.
● Text formatting: font, color, centering
● merge cells: combine several cells into one for things like writing sentences or adding
titles to tables or graphs
● Fill color: use color in cells to highlight titles or bring attention to calculated values
● Conditional formatting: This one is cool. For cells where someone can enter a number
to make a calculation, you can have set it so if the cell is empty, it’s one color and if it’s
full, it’s another color, or if the value is negative, it’s another color. Endless
possibilities……
With some creative formatting and a nice layout, you’re ready for publishing! The software
allows you to have selective sharing settings, where people can edit some cells (like for formula
inputs) and not have permission to edit others (like where you’ve worked really hard at writing
formulas)
● Go to “Data” → “Protected Sheets and Ranges” to bring up the permissions sidebar
● Go to your sheet for stage II - Making calculations
Spreadsheet Workshop
● Click “+ Add a Sheet or Range”
● Restrict editing so only you and your partner can edit this sheet
● Click the checkbox for “except certain cells”
● type in the ranges of cells you want others to be able to edit (the input cells for your
calculators). If you want to just click on them, click on the little tic-tac-toe icon where
you’d otherwise enter cell names.
Do the same for all other sheets in your document, making it so no strangers can edit your
formulas. Then go to sharing settings and select “anyone with the link can e
dit”
Congratulations! You are now ready to share this product with the world on your digital
portfolio!
Spreadsheet Workshop
Part VIII: Coin Flip Analysis
In this exercise, you will be processing data that the whole class has generated. On Dan’s DP,
you’ll find a link to a spreadsheet where students have reported their results from flipping coins
and rolling dice. You may have to wait for all the data to get entered, but you can still set up
your sheet for processing. In a new sheet:
Now you have to analyze the data. To find the minimum
number of times a given roll occurred, you could read
through every line of data. But there’s a much easier way!
If you type (A4:A20) *note they are separated with a colon,* then you will be referencing the
entire range of cells between A4 and A20
Finally, the frequency table. This is counting up the number of
times someone got each number of heads. E.g. if 14 different
students got 8 heads, the number 14 would go next to the 8.
This means you need to count up how many times the number 8
occurs in our data set. You’ll find the “=COUNTIF( __ , __ )”
formula to be particularly helpful.
Spreadsheet Workshop
Notice the comma in parentheses of the formula. This means
there are two different pieces you need to put into the
formula.
● First, designate the range of cells you want to count
from.
● Second (after the comma), designate the value you
want to count.
Now highlight all the cells in your frequency table and make a
column chart.
If your experience is anything like mine was, you’ll get a
graph that doesn’t quite look like my example above.
You might get a second set of columns and no x-axis.
In the chart editor, you can go in and adjust the data
ranges and series sets. Your x-axis should be the cells
with 1-20 in them. Your data series should be cells
with actual frequencies.
Now if the number 60 pops up, we know the
data is valid. But we can set up a
color-coding program to make it even more
visible if there is an error.
Rule 1: If the cell is empty, no fill color
Rule 2: If the value is equal to 60, color the
cell (whatever color you like)
Rule 3: If the value is not equal to 60, color
the cells (whatever color you don’t like)
Some of the groups accidentally rolled more or less than 60 times. It’s now very easy to find
those flawed data sets. For each one, fix them to represent 60 rolls. It’s critical that you do this
randomly!!!
Roll a fair die. Whatever you roll, add or subtract one of that number to even out the set. For
example, if a set of rolls adds up to 61 total, roll the die. If you get a 4, subtract one roll from the
4s column.
Once you have balanced out all of the data, it’s time to
make some calculations, starting with average value. You’ll
recall that to calculate the average, you add up all the
values, then divide it by the number of values you had.
First, create a little statistics table like the one above. To find the total number of entries, use
the =COUNT( function. To find the total of all entries, use the =SUM function. Divide the two to
find you average.
Now, just to double check that you set things up
right, let’s have the spreadsheet calculate the
average for us more quickly. Make a fourth row
as shown to the right, and use the =AVERAGE(
function. The result should match your
calculation.
Remember that column with all the color-coded 60s? Right click on that column and select
“hide column.” We don’t want to delete it, but it’s only getting in our way now.
Now we are going to calculate standard deviation. You’ve read about this statistic, but may not
have ever calculated it. It’s quite tedious to do by hand, but the computer makes it easy. The
steps are as follows:
Steps 2 and 3 need to be done to each value, so they need entire columns:
Spreadsheet Workshop
The next two pieces can be calculated in single cells up
top. Remember, you can use the =AVERAGE formula.
Remember the standard deviation is the square root of the
average of squares value.
Final task: Use the spreadsheet to calculate the Chi-Squared value for each set of 60 rolls
By now you have all the skills necessary to do this
calculation quickly with spreadsheet formulas.
Is this all pretty easy for you? Try a mini-project and use Sheets to make a functioning
spreadsheet tool. Here are some ideas of things you might try making.
Multiplication table (yes, like the one you used in 3rd grade math)
Color-coded chart of bicycle gear ratios
Car loan calculator
Quadratic Equation solver
Trip planner for hiking/biking/skiing trips w/ distance and elevation info!
Create an invoice for a business
Create a pay-stub program
Unit conversion calculators
Gradebook
Filter survey results to give you the information you really want
Law of Sines/cosines Solver
Financial tracker/personal budget tool
Cost splitter for group expenses
The key idea here is that interest paid by the bank will immediately be deposited into the
account. If you don’t withdraw any money, then you’ll have more money the next year, and
therefore earn more interest. The interest payments will increase each year!
The goal with this portion is to create a tool that will calculate the amount of money in an
interest-earning account after a given period of time. There are three main factors that will
affect the final result:
● Initial investment
● interest rate
● Time (how long the account sits for)
We will be able to see the effect year-to-year by having each row of a table represent
successive years.
We want to be able to easily adjust the values for initial investment and interest rates, so make
a small table off to the side where you can set those parameters.
For your main calculated columns, create a table the the following headings:
● Year Starting Amount Interest Earned Final Amount
Spreadsheet Workshop
Play around with figuring out how to set up your formulas so the spreadsheet does all the
calculations for you. You can use the image above to make sure your formulas are cranking out
the correct numbers.
● Pro-Tip: Remember that to hold a particular cell as part of the formula when you drag it
down, use the dollar sign ($) in the formula. Notice the way I’ve entered the formula in
cell C2 above.
If the annual interest rate is 4%, how much would it make sense for the bank to pay each
month?
Expand your parameter table to include “number of payments each year” and “compounded
interest rate”
Adjust the formula in your “interest” column to calculate interest based on the compounded
rate, instead of the annual rate. Use the example below to make sure your formulas are
working correctly.
Spreadsheet Workshop
This is cool. Now you have a great tool for watching your money grow in the bank!
Spreadsheet Workshop
Completion Checklist
❏ Overall
❏ All exercises completed in a separate tab with a title
❏ Every sheet uses a layout that makes sense and is visually interesting
❏ Part I: Temperature Graphs
❏ Data table with column headings
❏ 4 different types of graphs to represent the data
❏ Statements below each graph
❏ Use “merge cells” and “wrap text” to make the statements fit in an attractive
space
❏ Part II: Making Calculations
❏ Use formulas that feed numbers from other cells to calculate
❏ Have a layout with labels that make it clear what values represent
❏ Part III: Special Calculators
❏ Use formulas that feed numbers from other cells to calculate
❏ Have a layout with labels that make it clear what values represent
❏ Column headers include a description and units
❏ At least 3 different calculators that turn out correct values
❏ Part IV: Graphing a Function
❏ Line graph that plots your function
❏ X-Y table with x-values from -5 to 5
❏ Y-column uses a formula with X-column as inputs
❏ Y-column goes to two decimal places
❏ Part V: Tweaking a Function
❏ X-Y table going from -10 to 10
❏ Parameters in separate table with slope and intercept
❏ Formulas in y-column that use the $ to designate parameters
❏ The axes of your graph stay from -10 to 10 for all slopes and intercepts
❏ Part VI: Conditional Invoice
❏ Labor vs. parts tax rates declared in a parameters table
❏ Drop-down menu to select parts vs. labor
❏ Conditional formula to calculate the proper tax rate
❏ All costs get added up properly into a single invoice total
❏ Part VIII: Coin Flip Analysis
❏ One column with all the data (# of heads out of 20 flips)
❏ Stat table displaying minimum, maximum, and average number of heads
❏ Frequency table showing how many times each number of heads occurred (0-20)
❏ Column chart based on the frequency table
❏ Part IX:
❏ Conditional formatting to color code sums of 60
❏ Average frequency calculated by dividing and by =AVERAGE function
❏ Standard deviation calculated the long way and by using =STDEV function
❏ Chi-squared values calculated and added up for all sets of 60 rolls