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

Learn Excel from Mr Excel - Week 13

Learn Excel from Mr Excel


Copyright 2005 Bill Jelen
All Rights Reserved
Encourage your friends to sign up at
http://www.mrexcel.com/learn-excel.html
This week, there are four tips from the calculation
section.
1- While talking about a specific problem, the forecast
accuracy section introduces MAX and ABS functions.
2- Learn about FLOOR and CEILING to round to the
nearest $5 increment
3- Eliminate annoying floating point errors with Precision
as Displayed
4- A note about manual calculation mode

Part 2: Calculating with Excel

The Roman function will work with numbers from 1 to 3999. If you omit
the second argument, you will get classic Roman numerals as shown
above. Check the Excel help file for details on using simplified Roman
Numerals.
Factorials: The last obscure function is the factorial function. To write
5 factorial, you use the number 5 followed by an exclamation mark: 5!.
To calculate a factorial, you multiply the number by every number between itself and 1. So, 5! is 5x4x3x2x1, or 120.
Use the FACT function to calculate factorials, as shown in Fig. 455.

Fig. 455

Summary: If you had Excel in seventh grade, math would have been a
lot easier.
Functions Discussed: =LCM(); =GCD();=ROMAN();=FACT()

Measure the Accuracy


of a Sales Forecast
Problem: You handle forecasting for a company. You collect forecasts
from the sales reps and attempt to turn this into a production plan for
the manufacturing plant.
A lot of forecasting professionals measure forecast error as (Forecast
Actual)/Forecast, as shown in Fig. 456.

LEARN EXCEL FROM MR EXCEL

256

Part 2: Calculating with Excel

257

Fig. 456

When I had to measure forecast error, I did not agree with this method.
You have to understand that there are two kinds of problems in forecasting. If you forecast 400 units and the order does not show up, then
the manufacturing plant has 400 sets of material on hand and nowhere
to send them to. Inventory goes up. This is bad. On the other side, if
you forecast no units and an order for 400 shows up, the plant has to
scramble and start buying material on the gray market. This means the
product cost could double and your profits go away. This is also bad.
My formula for forecast accuracy treats both of these situations as equally bad. I take the absolute value of (ForecastActual) and divide by the
larger of the forecasts or actuals.
My forecast accuracy calculation follows these steps.
1)

First, calculate the absolute error on a product-by-product basis.


Whether the forecast was high or low, the error is always a positive
number. The ABS function returns the Absolute Value of a number, as shown in Fig. 457.

Fig. 457

LEARN EXCEL FROM MR EXCEL

Part
II

Part 2: Calculating with Excel

2)

Then, calculate the divisor. This is what I call the Size of the opportunity to screw up. If you miss a 1000 unit sale, it is much
worse than missing a 2 unit sale. As shown in Fig. 458, for column
G, use the MAX function to find whichever is larger, forecast or actuals.

Fig. 458

3)

Finally, calculate the error percentage by dividing F2/G2, as shown


in Fig. 459.

Fig. 459

As shown in Fig. 460, the traditional forecast error calculation is in E.


My forecast error calculation is in H. Sometimes they are the same.
Overall, though, because my calculation takes into account the negative
effect of an unforecasted order showing up, my error percentage will be
higher (and, I feel, more meaningful).

LEARN EXCEL FROM MR EXCEL

258

259

Part 2: Calculating with Excel

Part
II
Fig. 460

Summary: This started out as a tutorial on using ABS and MAX functions, but turned into a sermon on the best way to calculate forecast
accuracy. Note that I am currently the only guy I know who calculates
accuracy this way. When I bounce it off the pros at forecasting conventions, they reject this method. So, if you are doing forecasting, feel free
to use this method at your own risk.
Functions Discussed: =ABS(); =MAX()

Round Prices to Next Highest $5


Problem: You handle pricing for a company.
You have a spreadsheet showing your cost per
SKU, as shown in Fig. 461. Your manager tells
you to take the current manufacturing cost for
each item, multiply by 2, add $3, and then round
up to the next highest multiple of 5.

Fig. 461

LEARN EXCEL FROM MR EXCEL

Part 2: Calculating with Excel

259

Part
II
Fig. 460

Summary: This started out as a tutorial on using ABS and MAX functions, but turned into a sermon on the best way to calculate forecast
accuracy. Note that I am currently the only guy I know who calculates
accuracy this way. When I bounce it off the pros at forecasting conventions, they reject this method. So, if you are doing forecasting, feel free
to use this method at your own risk.
Functions Discussed: =ABS(); =MAX()

Round Prices to Next Highest $5


Problem: You handle pricing for a company.
You have a spreadsheet showing your cost per
SKU, as shown in Fig. 461. Your manager tells
you to take the current manufacturing cost for
each item, multiply by 2, add $3, and then round
up to the next highest multiple of 5.

Fig. 461

LEARN EXCEL FROM MR EXCEL

260

Part 2: Calculating with Excel

Strategy: The first portion of this calculation is fairly easy. The formula
in C2 shows the manufacturing cost multiplied by 2 with an additional
$3, as shown in Fig. 462.

Fig. 462

How do you round up to the nearest $5? You can use the CEILING function. This function takes one number and the number to round up to.
=CEILING(421,5) will result in a 425, as shown in Fig. 463. The answer
is always higher than the original number.

Fig. 463

Additional Information: There is also a FLOOR function. With the


FLOOR function, the number would be rounded down to the nearest
multiple of 5.
Gotcha: Both CEILING and FLOOR require the Analysis toolpack to
be installed.
LEARN EXCEL FROM MR EXCEL

Part 2: Calculating with Excel

261

Summary: The Ceiling function will round a number up to the nearest


increment.
Functions Discussed: =CEILING(); =FLOOR()

Why Is This Price Showing


$27.85000001 Cents?
Problem: You have a worksheet in which you expect the cells to show
dollars and cents. For some reason, a price in the formula bar is showing
a few millionths of a dollar, as shown in Fig. 464.

Fig. 464

Strategy: These stray values can happen due to something called floating-point arithmetic. Although you think in tens, computers actually
calculate with twos, fours, eights, and sixteens. Excel has to convert
your prices to sixteens, do the math, and then present it to you in tenths.
A simple number like 0.1 in a base-10 system is actually a repeating
number in binary.
Sometimes these seemingly bizarre rounding errors creep in. There is
one quick solution, but you have to be careful when using it.
1)

Format your prices to have two decimal places, as shown in


Fig. 465.

Fig. 465

LEARN EXCEL FROM MR EXCEL

Part
II

Part 2: Calculating with Excel

261

Summary: The Ceiling function will round a number up to the nearest


increment.
Functions Discussed: =CEILING(); =FLOOR()

Why Is This Price Showing


$27.85000001 Cents?
Problem: You have a worksheet in which you expect the cells to show
dollars and cents. For some reason, a price in the formula bar is showing
a few millionths of a dollar, as shown in Fig. 464.

Fig. 464

Strategy: These stray values can happen due to something called floating-point arithmetic. Although you think in tens, computers actually
calculate with twos, fours, eights, and sixteens. Excel has to convert
your prices to sixteens, do the math, and then present it to you in tenths.
A simple number like 0.1 in a base-10 system is actually a repeating
number in binary.
Sometimes these seemingly bizarre rounding errors creep in. There is
one quick solution, but you have to be careful when using it.
1)

Format your prices to have two decimal places, as shown in


Fig. 465.

Fig. 465

LEARN EXCEL FROM MR EXCEL

Part
II

Part 2: Calculating with Excel

2)

As shown in Fig. 466, from the menu, select Tools Options


Calculate Precision as Displayed. Excel will immediately truncate all values to only the number of decimals shown.

Fig. 466

Gotcha: There is neither Undo nor any way to regain those last numbers. Excel will warn you that your data will permanently lose accuracy,
as shown in Fig. 467.

Fig. 467

Summary: If you have annoying floating-point errors in your data, you


can turn on Precision as Displayed. You should exercise caution when
using this option because it will permanently change the values of all
numbers in your workbook.
Commands Discussed: Tools Options Calculate Precision as
Displayed

LEARN EXCEL FROM MR EXCEL

262

263

Part 2: Calculating with Excel

You Change a Cell in Excel


but the Formulas Do Not Calculate
Problem: You change a cell in Excel but the formulas do not calculate.
As shown in Fig. 468, cell D2 indicates that two plus two is not four.

Fig. 468

Strategy: Someone put the worksheet in manual calculation mode. Try


hitting F9 to calculate, as shown in Fig. 469.

Fig. 469

Pressing F9 will recalculate all cells that have changed since the last
calculation, plus all formulas dependent on those cells in all open
workbooks.
For quicker calculation, use Shift+F9. This will limit the calculation
to the current worksheet.
For thorough calculation, use Ctrl+Alt+F9. This calculates all formulas in all open workbooks, whether Excel thinks they have changed
or not.
Finally, there is the Ctrl+Shift+Alt+F9. This will rebuild the list of
dependent formulas and then do a thorough calculation.

LEARN EXCEL FROM MR EXCEL

Part
II

Part 2: Calculating with Excel

Additional Details: Manual Calculation mode can be changed for a


workbook. Go to Tools Options Calculation to see the various calculation options, as shown in Fig. 470.

Fig. 470

Gotcha: Before you go back to Automatic mode, ask the person who created the worksheet why it is in Manual Calculation mode. Sometimes
you will find a spreadsheet with tens of thousands of calculations that
takes 30-45 seconds to calculate. This is very frustrating when the system pauses for 45 seconds after every single data entry. If you have a
lot of data entry to do, a standard strategy is to use Manual Calculation
mode. In this mode you can make several changes and then hit F9 to
calculate.
Summary: Be aware that Excel offers a manual calculation mode. If
you have a spreadsheet that takes too long to calculate after every data
entry, you might consider using Manual Calculation mode temporarily,
doing the data entry, and then switching back to Automatic Calculation
mode.
Commands Discussed: F9 to calculate; Tools Options Calculate

Use Parentheses to Control


Order of Calculations
Problem: In what order does Excel perform calculations? Is 2+3*4 equal
to 20 or 14?
LEARN EXCEL FROM MR EXCEL

264

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