The COUNTIF function is a well-es­tab­lished function in Excel as well as other programs such as Google Sheets. COUNTIF lets users count different values based on one or more con­di­tions. Google Sheets, the web-based Office solution, provides a practical al­tern­at­ive to Microsoft’s Office.

COUNTIF in Google Sheets finds a wide range of ap­plic­a­tion, from counting dates to cal­cu­lat­ing similar products or names in a list. Con­di­tions can be text-based, which means that not only numerical values are counted. In ac­count­ing, the COUNTIF function is also used to create registers and listings for the last few months to help users gain a quick overview of their received invoices and amounts due.

The generic formula for con­di­tion­al counting in Google is as follows:

=COUNTIF (range; criteria)
Google Workspace (formerly G Suite)
Working smarter, together
  • Familiar Google tools all in one place
  • Using Gmail with your domain from IONOS
  • Configure business Gmail for your domain

Using COUNTIF in Google Sheets: step by step

The COUNTIF function is a great solution to calculate multiple values in a data set using one or more con­di­tions. Once you know the generic formula (above), the remaining steps in Google only take a few minutes. The in­di­vidu­al steps are as follows:

  1. Launch a new or existing Google Sheets spread­sheet.
  1. Enter the values you wish to count in the table.
  1. Now, you can enter the COUNTIF function into the desired cell or add it from the menu options. To do the latter, select “Insert” and then “Function.” Now, scroll to “Math­em­at­ics” and select “COUNTIF.”
  1. The formula will be added to the marked cell.
  1. Let’s assume you want to view the number of invoices that contain a lower amount than 6,000. Select an empty cell to enter the formula and specify the range of cells (cell numbers) you want to begin the count from. In the example below, counting will begin in cell B2. Place a colon to specify “from-to.” Counting will now begin in cell B2 and finish in cell B5.
  1. You’ve now specified the counting range, but haven’t added a condition for counting. You will need to define your con­di­tions within the formula. In this case, we are looking for values smaller than 6,000. Place a semicolon behind the last cell to be counted (B5, in this case). Use quotation marks to specify the condition "<6000" and close the formula by adding a round bracket.
  1. Now hit Enter to begin counting. The result will be a number that tells you how many invoices of an amount lower than 6,000 were present in the range specified. In this example, there were two values that met the con­di­tions for counting (3,000 and 4,000).

Just like you can search for values below 6,000, you could have searched for invoices greater than 6,000 using “>” or equal to “=” a specified amount. COUNTIF in Google Sheets also lets you search according to multiple criteria. If, for example, you’d like to count the number of entries below 6,000 and those above 12,000, you could use the following code to specify both con­di­tions.

(=COUNTIF (B2:B500;"<6000";B2:B500;">=12000")

You may also want to count invoices according to the date you received them. For example, to count all invoices received before 31.01.2020, use the following code:

(=COUNTIF (B2:B5;"<31/1/2020")

Google Sheets lets multiple users work on a spread­sheet at the same time. That means a single list can be processed by in­di­vidu­al de­part­ments. For example, ac­count­ing may wish to know how many invoices are out­stand­ing in a given time frame, while the marketing de­part­ment may use the COUNTIF function to check how often certain customers made a purchase.

Excel with Microsoft 365 Business and IONOS!
The Office you know, only better
  • Up to 50 GB Exchange email account
  • Outlook Web App and col­lab­or­a­tion tools
  • Expert support & setup service
Go to Main Menu