By Gerald Knight
Book Price: $39.99 USD
£28.50 GBP
PDF Price: $31.99
Cover | Table of Contents
B2 we calculate the difference between A2 and A1. Then we fill this formula down to cell B10. In cell B12 we simply take the average.B15 is:=AVERAGE(A2:A10-A1:A9)
B17:
{=AVERAGE(A2:A10-A1:A9)}
B12 and B17 are the same. Excel does all of the intermediate calculations and returns the result.B2 we calculate the difference between A2 and A1. Then we fill this formula down to cell B10. In cell B12 we simply take the average.B15 is:=AVERAGE(A2:A10-A1:A9)
B17:
{=AVERAGE(A2:A10-A1:A9)}
B12 and B17 are the same. Excel does all of the intermediate calculations and returns the result.B1 is:=A1/2<>INT(A1/2)
B10INDEX, INDIRECT, ADDRESS, and OFFSET functions are used extensively in this book, providing formulas with much greater flexibility than cell references can provide.INDEX function will do the job. The list can be in a column or a row. An example is shown in Figure 1-3.
=INDEX(A1:A7,C2)
C2 tells the formula which color is required. In this case it is color number five. The fifth color, the one in cell A5, is Blue. The formula in cell C4 returns a value of Blue as text.INDEX function works in most cases but sometimes you may not know the row or column of the required value. It could be anywhere on the worksheet, or even on another worksheet. Figure 1-4 contains just such an example.D3 is 373. D3 is the fourth column and the third row. The row and column numbers are in cells D12 and D11. The ADDRESS function in cell D14 uses them to build the address.D17. It lets you include the sheet name and builds it into the returned value.INDIRECT function returns the value corresponding to an address. In cell D20 the INDIRECT function uses the address built in cell D14 to retrieve the value in cell D3.D20
AVERAGE function finds the numbers in the range. I don't have to tell Excel where they are.AVERAGE function is usually convenient, but fails in Figure 1-7.
AVERAGE function gets the wrong answer because it ignores the cell with "None" in it. The AVERAGEA function is made for this situation. AVERAGEA works just like AVERAGE, except it considers non-numeric cells to have a value of zero. In item 1 formula 2, the AVERAGEA function calculates the average correctly.AVERAGEA ignores cells that are not used. In item 2, the Orders cell for Wednesday is empty and the AVERAGEA function does not consider the cell to have a value of zero.
DATA!$A:$L to add the new column, then click Finish, and the new data item appears in the field list.QUARTILE function has two parameters. First is a range that contains a list of numbers. Second is the quartile to be returned. It returns the maximum value of the quartile and the formula in Figure 2-26 returns the quartile number.
INDEX, INDIRECT, and ADDRESS functions are used in several of the applications in the rest of this book and have a unique job. Understanding how they work is critical to understanding this chapter's application, so make sure you have read the explanations of how they work in Chapter 1.
=G2, and fill this formula down to the bottom of the data, as in the Figure 4-9. Next, Copy and Paste Special (Values) on the G column.
=INT(450*(L1/100)). The result is 225.
=LARGE(I2:I450,L2). This gives the value we need. With these formulas in place we can easily test any percentage. If we enter 15 in cell L1, the value in L3 gives us the value to test the top 15%.=COUNTIF(I2:I450,">=" & L3). This counts the number of scores equal to or greater than the threshold. It tells how many bets we make if we bet the top half of the scores.=IF(I2>=L$3,E2,0) gives the payout for each dog. If the dog's score is less than the threshold, it is not bet and the payout is zero. To get the total payout for the model group, we use the formula =SUM(J2:J450) in cell L7.=COUNTIF(J2:J450,">0"). The win rate, the percentage of bets that win, is in L10. The formula is =L9/L6.=L7/L9 in L11. Finally, the formula =(L8-2)*L6 in cell L12 gives the total profit or loss for the 449 model dogs. We subtract 2 because the bet is $2.00 and we are interested in the profit.
=B3*F$1 to =(B3^F$1)*F$2), and fill this new formula across to column H and down to row 712.=CORREL(I3:I451,E3:E451) to measure the correlation between the scores in column I and the payouts in column E. The value is 0.103. This means the scores are positively correlated with the payouts, but the correlation is not especially strong.
|
INDEX( )
INDIRECT( )
ADDRESS( )
INT( )
|
ROW( )
MAX( )
STDEV( )
SUM( )
|
IF( )
AVERAGE( )
LN( )
EXP( )
|
INDEX, INDIRECT, and ADDRESS functions are vital to understanding the application, and they are explained in Chapter 1.|
Controls
Named Cells
|
Named Ranges
Array Formulas
|
Charting |
=IF(D19>G19,1,(IF(D19<G19,-1,0))). This is a nested IF function that returns 1 if the metric is above average, -1 if it is below, or 0 if it is equal to the average. The formula is filled down to cell H21. If the sum of H19:H21 is 3 or -3, the metric has been on the same side of the average for three days in a row. In cell A60 another nested IF function builds the alert. A result of blank is returned if there is no alert. This cell is named Alert.=Alert is entered. The cell is formatted bold and red. If there is no alert, the value is blank so the user sees nothing.