Returns the percentage of a range that meets a condition.
Parts of a PERCENTIF function
PERCENTIF(range, criterion)
| Part | Description |
|---|---|
| range | The range that is tested against criterion. |
| criterion | The pattern or test to apply to range. |
Sample Usage
PERCENTIF(A1:A10, “>20”)
PERCENTIF(A1:A10, “Paid”)
Notes
- If
rangecontains text to check against,criterionmust be a string.criterioncan contain wildcards including ? to match any single character or * to match zero or more contiguous characters. To match an actual question mark or asterisk, prefix the character with the tilde (~) character (i.e. ~? and ~*). A string criterion must be enclosed in quotation marks. Each cell inrangeis then checked againstcriterionfor equality (or match, if wildcards are used). - If
rangecontains numbers to check against,criterionmay be either a string or a number. If a number is provided, each cell inrangeis checked for equality withcriterion. Otherwise,criterionmay be a string containing a number (which also checks for equality), or a number prefixed with any of the following operators:=, >, >=, <, or <=,which check whether the range cell is equal to, greater than, greater than or equal to, less than, or less than or equal to the criterion value, respectively. - PERCENTIF supports only evaluating a single criterion.
Examples
| Expense | Today |
|---|---|
| Coffee | $4.00 |
| Newspaper | $1.00 |
| Taxi | $10.00 |
| Golf | $26.00 |
| Taxi | $8.00 |
| Coffee | $3.50 |
| Gas | $46.00 |
| Restaurant | $31.00 |
| … | … |
| range | criteria |
| A2:A9 | ”Taxi” |
| range | criteria |
| B2:B9 | >=10 |
| range | criteria |
| B2:B9 | 10 |
| range | criteria |
| A2:A9 | ”G*“ |
Related functions
- COUNTIF
- COUNTIFS