Consider the following table of data...
Year | Tempurature (°F) |
---|---|
2000 | 30.3 |
2001 | M |
2002 | 36.1 |
2003 | M |
Notice that half of the values are a single char, or string, such as M
The other half of the values are floats such as 36.1
.
What excel formula will average all numeric values? That is, we want to exclude all of the letter M
s from our average.
The following formula is my starting point...
=AVERAGEIF(INDIRECT("Sheet1!B2:B"&ROWS(B:B)), "<> 0")
Spreadsheet lang | Plain English |
---|---|
INDIRECT("Sheet1!B2:B"&ROWS(B:B)) | The entire B-column from sheet 1, except for the top row of column B (ignores column headers) |
<> 0 | not equal to zero |
We want to change the <> 0
("not equal to zero") to somthing like "is a number".
Note that the string of text M
is not a number.
Decimal numbers in floating point format (such as 36.12
) are numbers.... or perhaps it is a numeric string.
What do we replace <> 0
with in order to make sure that the AVERAGEIF
function skips over all non-numeric strings in the column being averaged?