KeepSorted

Google Sheets COUNTIF formula builder: count, add up or average the rows that match

Fill in the column, say what to look for, and copy the formula. It counts the rows that match, or adds up or averages a second column for those rows. You can add a second test (both must be true). Or count how many times each value appears, to find repeats. It runs in your browser and nothing you type here is sent anywhere. Every formula below was run in a real Google Sheet on 3 November 2026 (upper and lower case, blanks, repeated values, a decimal, a negative number, symbols like * and ?) and compared with an independent count, once in a US-locale spreadsheet and once in a German-locale one with semicolons: 64 checks, all matched.

Your formula

How to use it

Paste the formula into one empty cell. For "count", "add up" and "average" the answer is a single number. For the last two choices, put the formula in the first row next to your data; it fills the whole column, so the cells below it must be empty. COUNTIF takes one test. When you add a second test the builder switches to COUNTIFS, SUMIFS or AVERAGEIFS, and a row has to pass both tests. Upper and lower case are the same in all of them: "Apple", "apple" and "APPLE" are one value.

What the tests become

You pickThe formula uses
is exactly Apple"=Apple"
contains app"*app*"
starts with a / ends with e"a*" / "*e"
is greater than 9">9"
is empty / is not empty"" / "<>"
a cell, like E1">"&E1 (the test follows the cell)

The catches (found by testing in a real Sheet)

No code: KeepSorted

The add-on sorts the original table in place without code: no second copy, so formatting, checkboxes and notes move with their rows and people keep editing the same table. Select the range, pick the sort columns, Save. Free: one area per tab, up to 2 sort columns, no trial clock. Pro ($5/month or $39/year): up to 5 sort columns, custom orders like High > Medium > Low, ticked checkbox rows to the bottom, stacked tables sorted separately, and sorting after form responses, other editors' changes and an hourly check.

KeepSorted is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.

You're on the list. We'll email you when KeepSorted is ready.

The generators and the formulas stay free either way.

More KeepSorted tools and guides

Sources