formulas – How to get total tally of items in a column in Google Docs?

As remarked by Isolated, it would be far better if the sum values were at the top of the columns rather than the bottom. The benefits of this include the ability to put those lines in the frozen zone so that the totals are always visible.

In any event, your goal can be done by inserting one additional row at the bottom of the column that can act as the bottom edge of any formula range.

  • Insert a new row in row#7 (above the total row for “s”) enter a label of “Total”
  • Insert these formulas:
    • Cell B8: =countif(B$1:B$7,"=s")
      • copy this across the column
  • Cell B9: =countif(B$1:B$7,"=h")
    • copy this across the column

Note that the formula range is absolute on the row numbers. This means that if/when any new rows inserted/deleted below row#1 and above row#7, the formulas will automatically expand/contract to accommodate the new/deleted row.


Data structure