Google Sheets – How to Count Occurrences of a Number in a Column

google sheets

I have a spreadsheet for a festival. Unique identifier is ticket number. I want to query the column with tent number, to automatically generate two columns. First column has tent number. Second column has total number of occurrences of that tent number.

sample data. Column K and L are auto generated

I want Column K and L to autogenerate tent number and number of occupants based on column J. How can I do this?

Best Answer

Select ColumnJ. Data > Pivot table report..., Rows - Add field Tent#, Values - Add field Tent#. Click on down arrow next to "Summarise by: SUM" and select COUNT. Select the PT, Ctrl+c, got to K2(?) in your data sheet and Ctrl+v.