Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 929

In a MS Excel spreadsheet, how do we average all numeric values in a given column?

$
0
0

Consider the following table of data...

YearTempurature
(°F)
200030.3
2001M
200236.1
2003M

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 Ms 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)
<> 0not 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?


Viewing all articles
Browse latest Browse all 929

Trending Articles