Upload
binukumar100
View
219
Download
0
Embed Size (px)
Citation preview
8/18/2019 Learn Excel 13
1/12
http://www.mrexcel.com/learn-excel.html
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
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 thenearest $5 increment
3- Eliminate annoying floating point errors with Precision
as Displayed
4- A note about manual calculation mode
http://www.mrexcel.com/learn-excel.htmlhttp://www.mrexcel.com/learn-excel.html
8/18/2019 Learn Excel 13
2/12
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR 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 le for details on using simplied 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 be-
tween itself and 1. So, 5! is 5x4x3x2x1, or 120.
Use the FACT function to calculate factorials, as shown in Fig. 455.
Summary: If you had Excel in seventh grade, math would have been alot 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.
Fig. 455
256
8/18/2019 Learn Excel 13
3/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
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 fore-
casting. 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 prots go away. This is also bad.
My formula for forecast accuracy treats both of these situations as equal-
ly bad. I take the absolute value of (Forecast–Actual) and divide by thelarger 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 num-
ber, as shown in Fig. 457.
Fig. 456
Fig. 457
257
8/18/2019 Learn Excel 13
4/12
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
2) Then, calculate the divisor. This is what I call the “Size of the op-
portunity 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 nd whichever is larger, forecast or ac-tuals.
3) Finally, calculate the error percentage by dividing F2/G2, as shown
in 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).
Fig. 458
Fig. 459
258
8/18/2019 Learn Excel 13
5/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
Summary: This started out as a tutorial on using ABS and MAX func-
tions, 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 conven-tions, 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. 460
Fig. 461
259
8/18/2019 Learn Excel 13
6/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
Summary: This started out as a tutorial on using ABS and MAX func-
tions, 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 conven-tions, 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. 460
Fig. 461
259
8/18/2019 Learn Excel 13
7/12
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
Strategy: The rst 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.
How do you round up to the nearest $5? You can use the CEILING func-
tion. 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.
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.
Fig. 462
Fig. 463
260
8/18/2019 Learn Excel 13
8/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
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.
Strategy: These stray values can happen due to something called oat-ing-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. 464
Fig. 465
261
8/18/2019 Learn Excel 13
9/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
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.
Strategy: These stray values can happen due to something called oat-ing-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. 464
Fig. 465
261
8/18/2019 Learn Excel 13
10/12
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
2) As shown in Fig. 466, from the menu, select Tools – Options –
Calculate – Precision as Displayed. Excel will immediately trun-
cate all values to only the number of decimals shown.
Gotcha: There is neither Undo nor any way to regain those last num-
bers. Excel will warn you that your data will permanently lose accuracy,
as shown in Fig. 467.
Summary: If you have annoying oating-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
Fig. 466
Fig. 467
262
8/18/2019 Learn Excel 13
11/12
Part
II
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR 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.
Strategy: Someone put the worksheet in manual calculation mode. Try
hitting F9 to calculate, as shown in 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 calculationto the current worksheet.
• For thorough calculation, use Ctrl+Alt+F9. This calculates all formu-
las 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.
Fig. 468
Fig. 469
263
8/18/2019 Learn Excel 13
12/12
PART 2: CALCULATING WITH EXCEL
LEARN EXCEL FROM MR EXCEL
Additional Details: Manual Calculation mode can be changed for a
workbook. Go to Tools – Options – Calculation to see the various calcula-
tion options, as shown in Fig. 470.
Gotcha: Before you go back to Automatic mode, ask the person who cre-
ated the worksheet why it is in Manual Calculation mode. Sometimes
you will nd a spreadsheet with tens of thousands of calculations that
takes 30-45 seconds to calculate. This is very frustrating when the sys-
tem 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 Calculationmode. 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?
Fig. 470
264