I would like to know how to calculate variance (VAR, VARA, VARP) with criteria as in AVERAGEIF and AVERAGEIFS. The VARIF function does not seem to exist. This question also applies to others functions such as median, etc.
Google Sheets – How to Calculate Variance with Criteria
formulasgoogle sheets
Related Topic
- Google Sheets ArrayFormula – Find Previous Non-Empty Cell and Last Row
- Google Sheets – How to Use IMPORTDATA, IMPORTFEED, IMPORTHTML, and IMPORTXML Functions
- Google-sheets – Copying data with two criteria in sheets
- Google-sheets – ImportRange not pulling in Dates from first sheet in correct format
- Google-sheets – How to sum amount with a criteria separately by day in Google Sheets
- Google Sheets – Summing Columns Based on Criteria in Query Function
- Google Sheets – Using Sigma Notation to Calculate Series
Best Answer
The
FILTER
function can be used to first select the parts of the range that meet your criteria. That result can then be passed to VAR (e.g.=VAR(FILTER(source_range, condition))
).FILTER
can also be used to filter one column based on a condition on another column. For example, if you have columns:You can find the
VAR
for the rows that havex
in the first column like this: