Enroll Course

100% Online Study
Web & Video Lectures
Earn Diploma Certificate
Access to Job Openings
Access to CV Builder



Online Certification Courses

How To Calculate Data Matching Set Criteria In A Google Sheets

Google Sheet. 

Once the data in your spreadsheet has been analyzed, Google Sheets' COUNTIF function will return a count of the number of times that data appears in your document if it meets a set of specified criteria. This is how you should make use of it.

Use COUNTIF to Match on One Type of Criteria

Begin by launching Google Sheets and selecting the spreadsheet that contains the data you wish to count.

Replace range> and criterion> with the data range to be counted and the pattern to be tested, respectively, in an empty cell or the formula entry field, and then press Enter on your keyboard. It should be in the form of the following:

=COUNTIF(F2:I11,"<=40")

Click an empty cell, and then enter the COUNTIF function with the range and criterion you want to match.

Following the pressing of the "Enter" key, the cell will display the number of times the specified range meets the criteria entered in the cell.

After you hit the Enter key, the amount of times the function matched will show in the cell.

For example, if the range you wish to count contains a string of text, the result will look like this:

=COUNTIF(C2:C11,"George")

You can match strings as well.

Instead, you must use a wildcard to find all directors with the first name George, which is more difficult to do. Wildcards such as "?" and "*" can be used to match a single character or zero or more contiguous characters, respectively, when searching for a string of characters.

However, unless you use wildcards, the string needs to match exactly.

If you want to find all directors who have the first name "George," you should use the wildcard "*" that is provided by the function. It would look something like this:

=COUNTIF(C2:C11,"George*")

Instead, use the * wildcard to match all instances of George as a first name.

If the string you're matching contains an actual question mark or asterisk, the tilde () can be used as an escape character (ie? and *).

Use COUNTIFS to Match Multiple Criteria in a Single Expression

COUNTIF is the best function to use if you only need to match on a single type of criteria; if you need to match on multiple types, the COUNTIFS function is the best option to use. Except for the fact that it accepts multiple ranges and/or criterion, it is identical to COUNTIF. Additional ranges must have the same number of rows and columns as the initial range in order to be valid.

Simply include as many ranges and criteria as needed in the function to achieve the desired result. The format is exactly the same as that of COUNTIF. It should be in the form of the following:

=COUNTIFS(C3:C11,"George*",D3:D11,">=1990")

Have more than one range and criterion to match? Use the COUNTIFS function to count multiple ranges at the same time.

The COUNTIF and COUNTIFS functions will assist you in analyzing the data contained within your spreadsheet, regardless of whether you want to count a single set of criteria within a range or a collection of criteria within a range.

Corporate Training for Business Growth and Schools