How to Use the PERCENTIF Function in Google Sheets

The PERCENTIF function in Google Sheets helps you calculate the percentage of values in a range that meet a specific condition.

Can We Use Multiple Conditions in PERCENTIF?

Yes, but it requires a workaround involving curly braces and functions like SUM and ARRAYFORMULA. We’ll explore that later in the post.

Use this function carefully to avoid misleading percentages, especially due to blank cells in the range. It’s also essential to know when to use this function appropriately.

For example, you cannot use the PERCENTIF function in Google Sheets to calculate the percentage of total marks in a test. Instead, you should use a formula like =TO_PERCENT(SUM(A1:A6)/600), where A1:A6 contains the actual scores and 600 is the total maximum marks.

Now, assume you have a list of marks and want to calculate the percentage of subjects where marks are above 90. If the student scored above 90 in 4 out of 6 subjects, you’d calculate =TO_PERCENT(4/6). The PERCENTIF function in Google Sheets can help automate this.

Previously, you may have used:

=TO_PERCENT(COUNTIF(A1:A6, ">90")/6)

Now, with the PERCENTIF function:

Syntax and Arguments

PERCENTIF(range, criterion)
  • range – The set of cells to evaluate.
  • criterion – The condition to test against the range.

Notes:

  • The range can contain text or numbers.
  • For text, enclose criteria in double quotes and optionally use wildcards like *, ?, and ~.
  • For numbers, you may or may not use double quotes. Operators like >, >=, <, and <= are allowed.

Can You Use Operator Functions Like GT, LT in PERCENTIF?

Yes, though not commonly used. We’ll cover this in the examples section.

Examples of the PERCENTIF Function in Google Sheets

Numeric Range Example

Suppose you have numbers in cells B2:B10.

To calculate the percentage of values greater than 90:

=PERCENTIF(B2:B10, ">"&90)

Or simply:

=PERCENTIF(B2:B10, ">90")
Example of using the PERCENTIF function with a numeric range in Google Sheets

Alternative using the GT function:

=ARRAYFORMULA(PERCENTIF(GT(B2:B10, 90), TRUE))

(Not recommended for simplicity.)

You can also replicate the logic using:

=TO_PERCENT(COUNTIFS(B2:B10, ">"&90)/COUNTA(B2:B10))

Text Range Example

Suppose A2:A19 contains various text values.

To find the percentage of cells containing “Supermarket”:

=PERCENTIF(A2:A19, "Supermarket")

To include any text containing the word “Supermarket”:

=PERCENTIF(A2:A19, "*Supermarket*")
Example of using the PERCENTIF function with a text range in Google Sheets

Skipping Blank Cells in PERCENTIF in Google Sheets

Avoid using open-ended ranges like B2:B or A2:A if your data includes blanks.

To filter out blanks, use either the FILTER or TOCOL function:

=PERCENTIF(FILTER(A2:A, A2:A<>""), "Supermarket")
=PERCENTIF(TOCOL(A2:A, 3), "Supermarket")

Note: This also omits any error values (e.g., #N/A), which may slightly alter results.

Using Multiple Conditions in PERCENTIF

To apply multiple conditions (e.g., “Supermarket” OR “Fuel”):

=ARRAYFORMULA(SUM(PERCENTIF(A2:A19, {"Supermarket","Fuel"})))

This method uses an array of conditions wrapped in curly braces, passed to PERCENTIF via ARRAYFORMULA, then summed.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Custom Order for QUERY Pivot Headers in Google Sheets

By default, when you use the PIVOT clause in a Google Sheets QUERY, the...

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

More like this

Custom Order for QUERY Pivot Headers in Google Sheets

By default, when you use the PIVOT clause in a Google Sheets QUERY, the...

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.