In Google Sheets, is it possible to count multiple values inside the =AVERAGE
function only once?
Example:
=AVERAGE(32.3,48.9,33.2,48.9,33.5,49,33.8,49,33.5,48.5,48.8,33.9)
Count 33.5 only once.
google sheets
In Google Sheets, is it possible to count multiple values inside the =AVERAGE
function only once?
Example:
=AVERAGE(32.3,48.9,33.2,48.9,33.5,49,33.8,49,33.5,48.5,48.8,33.9)
Count 33.5 only once.
Best Answer
You can use
=UNIQUE
for this, to remove duplicate values from a list of numbers. Note that=UNIQUE
takes an array as parameter, not a list of numbers, so we need to wrap your list of numbers in{}
:This gives you a list of 9 elements - the duplicates have been removed:
Knowing this, we can combine the two formulas:
which gives the expected result of
40.21111111
.I have created a spreadsheet to demonstrate this, feel free to copy it. And see the documentation for
=UNIQUE
,=AVERAGE
and Using arrays in Google Sheets.