Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

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.

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 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.

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


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.

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.


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.


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Q · 9 months ago
    This is partly what I'm looking for.
    Now my next issue is, how can I sort these so that I get them in desending order?
    So it should be looking like this:
    James 4
    Nicol 3
    Ruby 3
    Lucy 2
    Tom 2
    John 1

    Hope you can help with that as well
    • To post as a guest, your comment is unpublished.
      skyyang · 9 months ago
      Hi,
      If you want to sort the results in descending order, you just need to sort the data by the formula result column after getting the result.
      Hope it can help you!
      • To post as a guest, your comment is unpublished.
        MCR · 20 days ago
        Whenever I try to sort, I get an error, is there a way I can fix that? I have the $A$1:$A$7, B1 as my formula - is there something in my formula I should edit?
  • To post as a guest, your comment is unpublished.
    noguchiii · 1 years ago
    VERY useful - thank you so much!
  • To post as a guest, your comment is unpublished.
    Mel · 1 years ago
    Thanks! Super useful!
  • To post as a guest, your comment is unpublished.
    Guest · 1 years ago
    When you drag the handle down to apply it to the rest of the values, it increments the search radius by 1. So if youre searching =COUNTIF(A1:A10,C1), when you drag the handle down, the second value will be =COUNTIF(A2:A11,C2).
    • To post as a guest, your comment is unpublished.
      Mikkel · 8 months ago
      You fix it this way
      =COUNTIF($A$2:$A$11,C2)