excel metrics
TRANSCRIPT
Using Excel for Test Metrics
AgendaUnderstanding Excel
BasicsText to columns and backRelative and absolute
valuesNamesCountIf / sumIfSubtotal vs consolidatePaste specialAutofillFormulas – if, thenAudit formulasFilterConditional formatting
Application to MetricsUnderstand the numbersTypes of reportsGas gaugeProgress chartDefect find / fix rate
Understanding Excel
Basics Auto sizing columns and rows Entering formulas Editing formulas Cell formatting View or hide formulas, gridlines, row and column
headers Hyperlinks Worksheet / workbook relationships Status Bar calculator Help
Text to Columns
George Jetson
Sally Johnson
Joe Smith
Chris Murray
-- TO --
1. Select the cells that you want to split apart (be sure the columns to the right are empty as they will be overwritten).
2. Click on Data, Text to Columns.
3. Choose Delimited.
4. Choose Space (or the delimiter that you are using).
5. Click Finish.
George Jetson
Sally Johnson
Joe Smith
Chris Murray
Combining Text Fields
-- TO --
1. Click on a blank cell (usually to the right of the existing cells).
2. Type in one of the following formula examples:
a. =A1&" "&B1 to list first name, then a space, then the last name
b. =B4&", "&A4 to list last name, then a comma, then the first name
3. The ampersand (&) character allows you to concatenate text fields together. The quotes will show up as text as in “ “ for a space or “, “ for a comma and a space.
George Jetson
Sally Johnson
Smith, Joe
Murray, Chris
Relative and Absolutes$ symbols in formulas allow you to “lock” a column or row.
This is a must if you try to copy and paste or autofill a formula.
When the cell is selected in the formula, press F4 to have it cycle between $C$R, C$R, $CR, CR
B C D
2 Pay Rate Bill Rate
3 George Jetson 10 =C3*$B$9
4 Sally Johnson 10.5 =C4*$B$9
5 Joe Smith 9.75 =C5*$B$9
6 Chris Murray 10.25 =C6*$B$9
8 OT multiplier
9 1.5
Name a Cell ReferenceMake your formulas more “readable” by naming cells
1. Click on a cell
2. In the Formula bar where it shows the Column / Row reference, type in name and press enter.
3. Reference that name in a formula.
To view the list of names, click on Insert, Name, Define
B C D
2 Pay Rate Bill Rate
3 George Jetson 10 =C3*OTx
4 Sally Johnson 10.5 =C4*OTx
5 Joe Smith 9.75 =C5*OTx
6 Chris Murray 10.25 =C6*OTx
8 OT multiplier
9 1.5
CountIf / SumIfCountIf: =countif(range,criteria)SumIf: =sumif(range,criteria,[sum_range]) Range = the range of cells you want evaluated / counted Criteria = the criteria in the form of a number, expression, or text that defines which cells will be
added. For example, criteria can be expressed as 32, "32", ">32", "apples". Sum_range = the actual cells to sum.
B C D
2 Position Name Hours Worked
3 tech 1 George Jetson 40
4 tech 2 Sally Johnson 40
5 engineer Joe Smith 50
6 tech 1 Chris Murray 50
7
8 Tech 1 =COUNTIF($B$3:$B$6,"tech 1") =SUMIF($B$3:$B$6,"tech 1",$D$3:$D$6)
9 Tech 2 =COUNTIF($B$3:$B$6,"tech 2") =SUMIF($B$3:$B$6,"tech 2",$D$3:$D$6)
10 Engineer =COUNTIF($B$3:$B$6,"engineer") =SUMIF($B$3:$B$6,"engineer",$D$3:$D$6)
11
12 Tech 1 =COUNTIF($B$3:$B$6,B12) =SUMIF($B$3:$B$6,B12,$D$3:$D$6)
13 Tech 2 =COUNTIF($B$3:$B$6,B13) =SUMIF($B$3:$B$6,B13,$D$3:$D$6)
14 Engineer =COUNTIF($B$3:$B$6,B14) =SUMIF($B$3:$B$6,B14,$D$3:$D$6)
Subtotal vs. Consolidate
Subtotal Dynamic (if linked to source data, when source data updates,
subtotals update) Ideal for a set number of rows (if referencing this data in another
sheet) Adjusts existing data
Consolidate Static (no change when source data is updated) Ideal for a varying set of rows (if referencing this data in another
sheet) Results are stored in a different location
Subtotal Select a cell in the range Click Tools, Subtotal Choose the reference column Choose the function (sum,
average, etc.) Choose the column(s) to
subtotals
Consolidate Select a blank cell (usually a
new sheet or below the existing data)
Click Tools, Consolidate Choose the function (sum,
average, etc.) Choose the range(s) to
consolidate; click on Add after each one
Choose Left Column Note: if you check “create
links to source data,” it will do a subtotal
Paste SpecialAccessible from the right
click menu after a copy
Some options available from the from the icon after a paste
Paste Special Formulas – pastes formulas only, no formatting Values – pastes the results of the formula (can
also use F9) Formats – pastes the format (no data); can also
use the format painter Skip blanks – pastes the values of cells containing
data, skips blank cells Transpose – transposes the data – converts rows
to columns or columns to rows
AutoFill
Type in the first two items in a series; autofill the rest by dragging the cells
Make your own autofill lists under Tools, Options, Custom Lists
Use the CTRL to adjust the autofill
Downfall: the list is static
Jan Jan 1 1 1/1/05 1/1/05
Feb Feb 2 2 1/2/05 1/2/05
Mar 3 1/3/05
Apr 4 1/4/05
May 5 1/5/05
Jun 6 1/6/05
Jul 7 1/7/05
Aug 8 1/8/05
Sep 9 1/9/05
Oct 10 1/10/05
Nov 11 1/11/05
Dec 12 1/12/05
Alternatives to AutoFill
Formulas, of course
1/1/05 1/1/05
=A1+1 =B1+7
=A2+1 =B2+7
=A3+1 =B3+7
=A4+1 =B4+7
=A5+1 =B5+7
=A6+1 =B6+7
=A7+1 =B7+7
=A8+1 =B8+7
=A9+1 =B9+7
Formulas – if / then Use conditional statements in formulas
Error handling (avoid div/0 errors) Create “smart” formulas that can adjust on the fly
Possible Pass Fail % Pass % Fail
Cell Formatting 115 110 5 =C2/$B2 =D2/$B2
Basic Formulas 28 0 0 =C3/$B3 =D3/$B3
Complex Formulas 205 112 0 =C4/$B4 =D4/$B4
Charts 0 0 0 =C5/$B5 =D5/$B5
Possible Pass Fail % Pass % Fail
Cell Formatting 115 110 5 =IF($B8>0,C8/$B8,0) =IF($B8>0,D8/$B8,0)
Basic Formulas 28 0 0 =IF($B9>0,C9/$B9,0) =IF($B9>0,D9/$B9,0)
Complex Formulas 205 112 0 =IF($B10>0,C10/$B10,0) =IF($B10>0,D10/$B10,0)
Charts 0 0 0 =IF($B11>0,C11/$B11,0) =IF($B11>0,D11/$B11,0)
Formula Audit
Select the formula you want to audit Click on Tools, Formula Auditing, Evaluate
Formula
Filter
Select a cell in the data range Click on Data, Filter, Auto Filter
Conditional Formatting
Based on the value of a cell / cells, adjust the formatting on the fly
Click the cell / cells, click on Format, Conditional Formatting
Note: trial and error is necessary in here; accepts absolute and relative values, accepts some formulas
Application to Metrics
Understanding Numbers
"Get your facts first, then distort them as you please." ~ Mark Twain
"Facts are stubborn, but statistics are more pliable." ~ Mark Twain
Torture numbers, and they'll confess to anything. ~Gregg Easterbrook
98% of all statistics are made up. ~Author Unknown
What does this mean?
Choice of formulas makes a difference Using averages vs. totals based on number of tests
will show different results One view of numbers is never enough
%pass, %fail numbers don’t mean much if you don’t know kind of defects are logged
Numbers alone are never enough Tests can’t cover everything Gut feel should still mean something – sometimes
numbers are hard to grasp
Types of Metrics Gas Gauge – overview of pass, fail, blocked reports
Progress Report – historical view of pass, fail, and blocked reports
Defect Find / Fix Report – how fast are we finding defects vs. how fast are they being fixed
Release Criteria – what are the criteria to release the project Pass rate for all components must be 97% or higher Submit rate of high priority defects must be less than x% of the
average defects logged in the last x weeks. Stress test GUI errors per 1,000 hours must be less than .02
Gas Gauge
How to build the gas gauge Gather the raw data Organize it by test area / category / test type Create the following for each line:
% complete of planned % pass of planned -- % pass of complete % fail of planned -- % fail of complete % block of planned -- % block of complete
Determine whether to use % of planned or % of complete (may use both depending on the report)
Determine whether totals should be averages or based on the actual number of tests
Develop the gas gauge
Progress Chart – Ideal world
Progress Chart – real world
How to build the progress chart
Determine the total number of tests possible for each area
Determine milestones for 100% execution, 60% pass, 80% pass, 90% pass
Weekly, track the number of passes, fails, and blocks
Find / Fix Rate – Ideal World
Find / Fix Rate – Real World
Find / Fix Rates
Track for all defects Track for just high priority (must fixes for a
product to ship) Track number of defects submitted and
resolved each week Chart the results