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. 
How to calculate variance with criteria?
google spreadsheets;formulas
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:x | 1y | 2x | 3You can find the VAR for the rows that have x in the first column like this:=VAR(FILTER(B:B, A:A = x))