Spreadsheet Models for Managers


Getting Access to Spreadsheet Models for Managers


ISpreadsheet Models for Managersf you use Excel to model businesses, business processes, or business transactions, this course will change your life. You'll learn how to create tools for yourself that will amaze even you. Unrestricted use of this material is available in two ways.

As a stand-alone Web site
It resides on your computer, and you can use it anywhere. No need for Internet access.
At this Web site
If you have access to the Internet whenever you want to view this material, you can purchase on-line access. Unlimited usage. I'm constantly making improvements and you'll get them as soon as they're available.

To Order On Line

Order "Spreadsheet Models for Managers, on-line edition, one month" by credit card, for USD 69.95 each, using our secure server, and receive download instructions by return email.
Or order via Google Checkout.
Order "Spreadsheet Models for Managers, on-line edition, three months" by credit card, for USD 199.00 each, using our secure server, and receive download instructions by return email.
Or order via Google Checkout.
Order "Spreadsheet Models for Managers, downloadable hyperbook edition" by credit card, for USD 199.00 each, using our secure server, and receive download instructions by return email.
Or order via Google Checkout.

To Order by Mail

Make your check payable to Chaco Canyon Consulting, for the amount indicated:
  • For the download: USD 199.00
  • For access online for three months: USD 199.00
  • For access online for one month: USD 69.95
And send it to:
Chaco Canyon Consulting
700 Huron Avenue, Suite 11J
Cambridge, MA 02138

To use the course software you'll need some other applications, which you very probably already have. By placing your order, you're confirming that you have the software you need, as described on this site.

Subscribe now!

Spreadsheet Models for Managers


Problem Set 13
Using Macros I


Be sure to check the list of worksheet functions that are needed for the homework assignments, to see which new functions (if any) might help with this one.

For a quick way to copy homework problem data into your homework solution, see "Avoid retyping homework problem data."

Remember that some problems are slight extensions of what we show you in demonstrations and the session notes, and some problems are somewhat ambiguous. This is intended to parallel what you'll frequently encounter at work. If you feel a bit confused, there are some things you can do to help clarify things.

Before attempting this homework, you might find it helpful to read about:

Numbers at the left in square brackets indicate point values.

13.1 [30] Blue square

Write a macro that computes, for any number, the multiple of 100 that is nearest to that number. Call your macro "Round100". For example, Round100(712) should return 700. You can assume that the argument to your macro is always a number. Your macro should round to the next largest 100 if the number ends in 50 or more. The behavior for negative numbers should be symmetric, that is, for any x, Round100(-x) should be the same as -Round100(x). Use your macro to demonstrate the following results:

Retrieve homework data
x Round100(x)
457.2500
-271-300
00
100100

13.2 [30] Blue square

The price schedule provided to KFC for cases of fried chicken buckets offers discounts depending on the number of cases of buckets ordered. The schedule is shown in the table below, which is reproduced from Problem 11.3.

Retrieve homework data
Quantity Price
1-399 $21.00
400-1199 $18.00
1200 or more $17.40

Write a macro called BucketPrice which accepts a single argument that represents the quantity ordered, and returns a value equal to the price of a case of buckets. Your macro should assume that its argument is any number greater than or equal to 1. If it receives an argument that isn't an integer, it should truncate the fractional part of the argument and return a result as if it had received an integer argument. Demonstrate your macro for these arguments: 276.00, 400.00, 431.27, 1899.20.

13.3 [40] Blue square

In the course of modeling operations at KFC, you find that you buy several products with three-step "staircase" price schedules as in Problem 13.2. You could write a separate function macro for each one, but that approach is wasteful and creates duplicated code. So you decide instead to write a single macro that is invoked by each specialized macro. This is more reliable because it concentrates all the "thinking" in a single place.

(a) [20] Gray square

The macro is called Staircase3, and does all the hard work for all three-step staircase pricing. It returns a single floating-point number — the price for the quantity specified. It accepts six arguments, ordered as follows:

quantity
The quantity whose unit price is to be determined by Staircase3. If it receives a value that isn't an integer, it should truncate the fractional part of the argument and return a result as if it had received an integer argument.
price0
The undiscounted price. In the chicken buckets example, this argument would have the value $21.00. A floating-point number.
thresh1
The minimum number of units required for the first discount level. In the chicken buckets example, this argument would have the value 400. A large integer.
price1
The first level of discounted price. In the chicken buckets example, this argument would have the value $18.00. A floating-point number.
thresh2
The minimum number of units required for the second discount level. In the chicken buckets example, this argument would have the value 1200. A large integer.
price2
The second level of discounted price. In the chicken buckets example, this argument would have the value $17.40. A floating-point number.

Write the macro Staircase3, and demonstrate that it gives correct chicken-bucket prices for the chicken-bucket price schedule and these order quantities: 276.00, 400.00, 431.27, 1899.20.

(b) [20] Gray square

Rewrite the macro BucketPrice, calling it BucketPrice3, so that it behaves exactly like BucketPrice, but computes its results by invoking Staircase3 internally. Price3 takes a single argument, and produces results identical to Price. Demonstrate its use with the four values 276.00, 400.00, 431.27, 1899.20.

For more about my spreadsheet consulting and training services, visit SpreadsheetAce.com.

Last Modified: Wednesday, 22-Oct-2008 05:31:20 EDT

Feeling queasy about spreadsheets?
We run our companies, in part, based on spreadsheets, yet we often wonder if they're really right. Learn more about improving the reliability and effectiveness of your financial models.
More
Sign Up for the On Line Version of This Course
With dozens of solved problems and special course tools, this course can dramatically increase your spreadsheet skills. For just USD 199.00 you receive three months of access with unlimited email support. Learn more about improving your spreadsheet sophistication and effectiveness.
More
Get the Hyperbook Edition of This Course
Identical to the edition you're viewing, but with dozens of solved problems and special course tools, and it stands alone — no Internet connection required. For just USD 199.00, it includes three months of unlimited email support. Learn more about improving your spreadsheet sophistication and effectiveness.
More