chapter1

advertisement
Using Spreadsheets to Solve Problems
1.5 Working with Units Problems
Thus far the workbooks we’ve used have contained only a single worksheet. A more complex set
of problems are introduced in this chapter which require calculations with multiple unit
conversions and workbook designs that span multiple worksheets. As the sets of data inputs and
calculations become more complex, we will need to understand how to use and ultimately design
worksheet solutions that are easy to use and maintain.
WORKING WITH UNIT CONVERSIONS:
THE PROBLEM
First consider a simple problem that analyzes the compensation received at two different places
of employment.
Alex works for a fast food restaurant 20 hours a week for 50 weeks per year. He makes $9.00
an hour. The chain across the street is offering him an annual wage of $8500 for the same
number of hours per week and a two week paid vacation. He is willing to switch jobs only if
the new job pays more than his old one. Should he switch jobs?
The first step in solving this problem is recognizing that not all of the information is in
comparable units. To compare the compensation received at Alex’s current job versus the
compensation he would receive at the other, the salary amounts must be in equivalent units
(dollars per hour, dollars per year, etc.). The current employment wage data is in dollars per
hour, while the other offer is in dollars per year.
APPROACH #1 – CONVERTING ALL UNITS TO DOLLARS PER YEAR
One approach is converting Alex’s current wages to dollars per year. The following technique
can be used given the wage information provided: dollars per hour, hours per week, and weeks
per year.

First convert dollars per hour to dollars per week using the number of hours per week Alex
works. Notice how hours in the denominator cancel out hours in the numerator resulting in
the unit dollars per week.
9

dollars
hours
*
20
hours
week
=
180 dollars
week
Then take dollars per week just calculated and convert it to dollars per year. Alex works 50
weeks per year. The weeks in the denominator will cancel out the weeks in the numerator
resulting in the unit dollars per year.
180 dollars * 50
week
Units Problems 1.5
weeks
year
CSE1111
= 9000 dollars
year
Page 67
Using Spreadsheets to Solve Problems
Those with good mathematical skills should be able to convert dollars per hour directly into
dollars per year as follows:
9
dollars
hour
*
20 hours
week
*
50 weeks
year
=
9000 dollars
year
ANAYLZING THE DATA
The current job’s wage per year has now been calculated and can be compared with the wage
offered from this new job. The job at the other restaurant pays $8500 per year. Now that the
values are in “like units,” in this case dollars per year, the two values can be compared in several
different ways:

Use a relational expression to see if the proposed job pays more than the current job. By
doing this analysis, it becomes clear that the remuneration at this proposed job is less than
what Alex receives at his current job. An IF function can also be used if a different result is
desired other than a TRUE or FALSE value.
$8500>9000  FALSE

Use subtraction to quantify the cost difference of the current job vs. the proposed job.
$8500 dollars/year - $9000 dollars/year  - $500 dollars difference

Compare the percent difference by calculating the ratio of the difference in wages vs. the
current wage.
(new wage - current wage)/current wage  (8500-9000)/9000  -5.6%
APPROACH #2 – CONVERTING ALL UNITS TO DOLLARS HOUR
A second approach is to convert $8500 per year into dollars per hour. First take the dollars per
year and divide it by weeks per year to arrive at dollars per week. Notice that only the weeks
worked are used (50) so the two salaries are for the same amount of work. The paid vacation is
already taken into account by including it in the wage. Finally divide dollars per week by hours
per week to obtain dollars per hour.
8500 dollars
year
50 weeks
year
170 dollars
week
20 hours
week
8.5 dollars
hour
These conversions can become quite complex. The easiest way to deal with this complexity is to
write out the units and perform each of the term cancellations. Engineers have always been
taught that if you solve the “units” conversion problem the rest is easy. A couple of rules of
thumb from math that you should remember:

A unit in the numerator can be canceled out by a like unit in the denominator.
Units Problems 1.5
CSE1111
Page 68
Using Spreadsheets to Solve Problems

When dividing two fractions, the denominator of the denominator becomes the numerator.
Alternatively, invert the 2nd fraction and multiply. In the example below you can cancel out
weeks to get dollars per year.
dollars
year
weeks
year
dollars * year
year
weeks
dollars
week

Only add and subtract like units.

Always make sure your conversions make sense. For example: You convert dollars per year
into dollars per week and find your result is more than what you started out with, is this
correct? Logic would tell you that weeks are smaller units than years. Thus, you would be
expecting dollars per week would be less than dollars per year.
What if you were told that the first job pays $9 per hour in Canadian dollars and the second job
pays $8.50 in US dollars? How can $8.50 US be compared with $9.00 Canadian? The
conversion rate on a website gives the following info: There are 0.95451 US Dollars per
Canadian Dollar. How can these values be compared?

To convert $9 Canadian to US dollars multiply Canadian dollars by the conversion of US
Dollars per Canadian dollar
9 Canadian$
*
.95451 US $
Canandian$
8.59 US$
It would be incorrect to divide 9 by .95451, from a units standpoint that would result in the unit
Candadian$2 per US$. Logically, if you would divide 9 by .95451 the resulting value will be
larger. As the US dollar is worth more than the Canadian dollar (at this point in time), one
would expect $9 Canadian dollars to result in fewer US dollars.
Alternatively, $8.50 US could be converted to Canadian dollars by dividing by this conversion
factor.
USING A SPREADSHEET TO EXECUTE THE SOLUTION
Now that the first step, understanding the
problem, of our problem solving approach is
completed, the next step is to execute it within an
Excel workbook.
The spreadsheet in Figure 1 contains the input
information given in this problem, with each input
value explicitly listed. For a simple problem such
as this, it may be easier to just plug the values into
a calculator. But, what if later on one or more of
the input values change? The advantage of listing
Units Problems 1.5
CSE1111
1
2
3
4
5
6
7
8
A
Job #1:
rate
hours per week
weeks per year
Job #2:
rate
hours per week
weeks worked per
9 year
10
11 Should he switch?
B
C
D
$/hour
$/year
$
9.00 $ 9,000.00
20
50
$
8.50
$
8,500.00
20
50
don't switch
Figure 1
Page 69
Using Spreadsheets to Solve Problems
each variable explicitly becomes quickly apparent.
Using the spreadsheet in Figure 1, write the necessary formulas to determine whether or not to
switch jobs.
Using the first approach, calculate the annual income earned for Alex’s current job in dollars
per year. This requires multiplying the dollars per hour by hours per week and weeks per year
to arrive at dollars per year. Translated into Excel syntax we have the formula =C2*B3*B4 in
cell D2. Then compare the result with the $8500 proposed salary for the new job. Previously
this was shown using a simple relational expression. Here, in cell D11, use an IF function to
explicitly list whether or not to switch. =IF(D7>D2, “switch”, “don’t switch”). This can
also be done in one step by substituting C2*B3*B4 for D2 in the IF statement as follows:
=IF(D7> C2*B3*B4, “switch”, “don’t switch”)
Using the second approach to compare the dollar per hour rate for both jobs by writing the
formula =D7/B8/B7 in cell C7. Cell C7 will then contain the hourly rate for this new job. A
formula can then be written to compare these two rates.
Units Problems 1.5
CSE1111
Page 70
Using Spreadsheets to Solve Problems
Units Problems 1.5
CSE1111
Page 71
Using Spreadsheets to Solve Problems
EXERCISE 1.5 –1 UNITS & SPREADSHEET DESIGN: WATER PROBLEM
sheet: units
A
B
1 Unit
Conversion
2 Cups per person per practice/meet
4
3 cups/gallon
16
4 pounds/gallon
5 $/pound to ship < 2000 pounds
8.22
$1.00
6 $/pound to ship >=2000 pounds
$0.75
7 $/gallon of water
$0.25
sheet: Price
1
A
B
Group#
Number of
people at
Practice or
meet
2
3
4
5
6
7
1
2
3
4
5
C
10
50
100
250
1000
D
E
# gallons Purchase
cost of
Water in $
C2
D2
F
Unit cost of
shipping in
$/pound
E2
G
H
Total
Total Cost
shipping of Water in $
cost in $
F2
G2
I
% ship costs
$/cup of water
H2
I2
You are an assistant manager for a sports team and are charged with the job of ordering water
for your practices and meets. You need to calculate the cost of water for a series of group sizes
that range from 10 people to 1000 people. The cost of water includes two components; the cost
of purchasing the water and the cost of shipping the water. Water shipment costs vary based on
the total weight of a shipment. Assume the water for each practice/meet is shipped separately.
You have developed a workbook with two worksheets: Units and Price. You will use the Price
worksheet to summarize the costs for each group size. You have put the following information
on the Units worksheets:






Each person drinks an average of 4 cups of water per practice/meet - units!B2
There are 16 cups per gallon – units!B3
A gallon of water weighs 8.22 pounds - units!B4
Shipping costs of shipments weighing less than 2000 pounds are $1.00 per pound. –
units!B5
Shipping costs of shipments weighing 2000 pounds or more are $0.75 per pound –
units!B6
A gallon of water costs $0.25 – units!B7
Units Problems 1.5
CSE1111
Page 72
Using Spreadsheets to Solve Problems
1. Write a formula in Price!C2 to calculate the number of gallons that will be drank by group #1.
Assume you will copy this formula down the column.
__________________________________________________________________
2. Write a formula in Price!D2 to calculate the cost of purchasing the water in dollars that
will be drank by group #1. This formula will be copied down the column.
__________________________________________________________________
3. Write a formula in Price!E2 to determine the unit cost in dollars per pound to ship the water
that will be drank by group #1. Assume you will copy this formula down the column.
__________________________________________________________________
4. Write a formula in Price!F2 to calculate the total cost of shipping the water in dollars that
will be drank by group #1. Assume you will copy this formula down the column
__________________________________________________________________
5. Write a formula in Price!G2 to calculate the total cost of water in dollars that will be
drank by group #1. Assume you will copy this formula down the column.
__________________________________________________________________
6. Write a formula in Price!H2 to calculate the shipping cost percentage of the total cost for
group#1. Assume you will copy this formula down the column.
__________________________________________________________________
7. Write a formula in Price!I2 to calculate the Total cost of one cup of water in the ten person
group. Assume you will copy this formula down the column.
__________________________________________________________________
Units Problems 1.5
CSE1111
Page 73
EXERCISE 1.5 –2 UNITS & SPREADSHEET DESIGN:CHAPTER REVIEW
Refer to the attached Excel worksheets for Questions 1-10:
The Quarter is over and its time for the students to celebrate their success with a party. You are giving
a party and serving “Mr. T’s famous chili”. You have created an Excel workbook with three
worksheets. The recipe is given on the recipe sheet. On the units sheet are some unit equivalencies
you will need. On the shopping sheet you will create the shopping list you will need in order to make
chili for 20 adults. Each recipe serves 10 adults. Sheet names appear below each table. When referring
to cell addresses the sheetname!cell address format was used (e.g., recipe!A1).
1. Write an Excel formula in cell units!B7 to calculate the number of multiples of the recipe needed
to feed all the adults at the party.
2. Write a formula in cell shopping!C2 to calculate the quantity of meat in pounds you will need to
purchase for the party. Assume you will copying the formula into cell shopping!C3.
3. Write an Excel formula in cell shopping!C4 to calculate the ounces of chili powder you will need
to purchase for the party.
4. Write an Excel formula in cell shopping!C5 to calculate the pounds of beans you will need to
purchase for the party.
5. Write an Excel formula in cell shopping!F2 to calculate the total cost of the meat. Assume you
will copy this formula into F3:F5.
6. Write an Excel formula in cell shopping!F6 to calculate the total cost of your shopping list.
Assume you have copied down the formula in question 5 into F3:F5.
7. Cell shopping!G2 is formatted as a percent. Write an Excel formula in cell shopping!G2 to
calculate what is the cost of meat as a percentage of the total cost. Assume you need to copy this
formula into G3,G4 and G5.
8. What is “goal seek” and how can it be used in this problem?
Units Problems 1.5
CSE1111
Page 74
9. A friend has told you about a local deli that sells two types of prepared chili in tubs (regular and
extra meat). Each tub feeds approximately 4 people. The regular chili from the deli costs $12.95
per tub and the extra meat chili costs $15.95 per tub. You want to decide between cooking your
own chili and purchasing the prepared chilis based on the following criteria:

If the prepared extra meat chili costs less than cooking then you will buy it.

If the extra meat chili is more expensive than your cooked chili but the regular meat chili is
cheaper than your cooked chili buy the regular chili.

If both of these prepared chilis are more expensive than your cooking then you will cook your
own.
Write an Excel formula in cell shopping!D8 which will determine whether you will Buy-Extra
Meat, Buy-Regular or Cook the Chili.
10. If you cook the chili you will have the ingredients delivered. The Acme delivery service will pick up
these ingredients from both the butcher and the grocery and deliver it at the same time. They
charge 10% of the total value of the purchases or a minimum delivery fee of $4, whichever is
higher. Write a formula in cell shopping!B8 to calculate the total cost of all the ingredients
including delivery charges.
Units Problems 1.5
CSE1111
Page 75
A
Unit
ounces per pound
cups of beans per pound
tablespoon chili per ounce
adults served per recipe
total adults attending party
number of multiples of recipe
1
2
3
4
5
6
7
Chili Problem:
B
conversion
16
4
3
10
20
B7
Units!
A
B
C
1
ingredient
Quantity
unit
2
meat
3
pounds
3
tomatoes
2
each
4
chili powder
1
tablespoon
5
beans
1
cup
1
2
3
4
5
6
7
8
A
store
Butcher
Grocery
Butcher
Grocery
B
ingredient
meat
tomatoes
chili powder
beans
Total
B8
w/delivery
C
Quantity
C2
C3
C4
C5
Buy
Cook
D
unit
pounds
each
ounces
pounds
Recipe!
E
$/unit
$4.00
$0.50
$2.00
$1.00
F
total cost
F2
F3
F4
F5
F6
or D8
Shopping!
Units Problems 1.5
CSE1111
Page 76
G
% of total
G2
G3
G4
G5
H
ingredient
meat
tomatoes
chili powder
beans
Download