Syntax
=AVERAGEIF(range, criteria, [average_range])Arguments
| Argument | Required | Description |
|---|---|---|
range | Required | The cells to check |
criteria | Required | The condition |
average_range | Optional | The cells to average (the checked cells when left out) |
How to use AVERAGEIF
AVERAGEIF takes 2 required arguments and 1 optional argument. Type =AVERAGEIF( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=AVERAGEIF(A1:A4, ">2")Result Data in the sheet
| A | |
|---|---|
| 1 | 1 |
| 2 | 3 |
| 3 | 5 |
| 4 | 2 |
=AVERAGEIF(A1:A3, "y", B1:B3)Result Data in the sheet
| A | B | |
|---|---|---|
| 1 | y | 10 |
| 2 | n | 99 |
| 3 | y | 20 |
Related statistical functions
- AVEDEVReturns the average of the absolute deviations of the numbers from their mean.
- AVERAGEReturns the average (arithmetic mean) of the numbers.
- AVERAGEAReturns the average of the values, counting text as 0 and TRUE as 1.
- AVERAGEIFSReturns the average of the cells that meet all of several conditions.
- BETA.DISTReturns the beta distribution, optionally scaled to an interval from A to B.
- BETA.INVReturns the inverse of the cumulative beta distribution.
- BINOM.DISTReturns the binomial distribution probability of a number of successes in a number of trials.
- BINOM.DIST.RANGEReturns the probability that the number of successes falls between two values.
- BINOM.INVReturns the smallest number of successes for which the cumulative binomial distribution reaches a probability.