Skip to main content
 

How to count number of occurrence in a column in Google sheet?

Author: Xiaoyang Last Modified: 2024-08-22

Supposing, you have a list of names in Column A of Google sheet, and now, you want to count how many times each unique name is appeared as following screenshot shown. This tutorial, I will talk about some formulas for solving this job in Google sheet.

a screenshot of the original data range and the number of occurrence of the data range

Count number of occurrence in a column in Google sheet with helper formula

Count number of occurrence in a column in Google sheet with formula


Count number of occurrence in a column in Google sheet with helper formula

In this method, you can extract all the unique names from the column firstly, and then count the occurrence based on the unique value.

1. Please enter this formula: =UNIQUE(A2:A16) into a blank cell where you want to extract the unique names, and then press Enter key, all unique values have been listed as following screenshot shown:

Note: In above formula, A2:A16 is the column data that you want to count.

a screenshot of using the UNIQUE function to extract all unique values

2. And then go on entering this formula: =COUNTIF(A2:A16, C2) beside the first formula cell, press Enter key to get the first result, and then drag the fill handle down to the cells you want to count the occurrence of the unique values, see screenshot:

Note: In above formula, A2:A16 is the column data that you want to count unique names from, and C2 is the first unique value you have extracted.

a screenshot of using COUNTIF to count the occurrence of each unique value

Count number of occurrence in a column in Microsoft Excel:

Kutools for Excel’s Advanced Combine Rows utility can help you count the number of occurrence in a column, and it also can help you to combine or sum corresponding cell values based on same cells in another column.

a screenshot of using Kutools for Excel to count the number of occurrence in a column

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


Count number of occurrence in a column in Google sheet with formula

You can also apply the following formula to get the result. Please do as this:

Please enter this formula: =ArrayFormula(QUERY(A1:A16&{"",""},"select Col1, count(Col2) where Col1 != '' group by Col1 label count(Col2) 'Count'",1)) into a blank cell where you want to put the result, then press Enter key, and the calculated result has been displayed at once, see screenshot:

Note: In above formula, A1:A16 is the data range which including the column header that you want to count.

a screenshot of using an array formula to count the number of occurrence in a column


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!