COUNT Function (LibreOffice Calc)

Math Beginner LibreOffice Calc Introduced in LibreOffice 3.0
arithmetic statistics basic-functions

The COUNT function in LibreOffice Calc counts numeric values in a range or list of arguments. This guide explains syntax, examples, edge cases, errors, and best practices.

Compatibility

What the COUNT Function Does

  • Counts numeric values
  • Ignores text, empty cells, and logical values
  • Works with ranges, references, and mixed arguments
  • Supports multiple ranges in a single formula
  • Works across sheets
  • Handles large datasets efficiently

COUNT is ideal for determining how many valid numeric entries exist in a dataset.

Syntax

COUNT(value1; value2; ...)
LibreOffice Calc uses semicolons (;) to separate arguments, not commas.
COUNT only counts numbers. To count text, use COUNTA. To count blank cells, use COUNTBLANK.

Basic Examples

Count numbers in a range

=COUNT(A1:A10)

Counts how many cells in A1 through A10 contain numeric values.

Count numbers in multiple ranges

=COUNT(A1:A10; C1:C10)

Useful when numeric data is separated into blocks.

Count specific values

=COUNT(5; 12; "text"; 19)

Result: 3 (text is ignored)

Count mixed references and values

=COUNT(A1:A10; 25; C5)
COUNT can accept up to 255 arguments, including ranges, values, and references.

Advanced Examples

Count numbers across sheets

=COUNT(Sheet1.A1:A10; Sheet2.B1:B10)

Count numbers using 3D references

LibreOffice supports 3D ranges:

=COUNT(Sheet1:Sheet5.A1)

Counts how many of the A1 cells across five sheets contain numbers.

Count only visible cells (filtered data)

LibreOffice Calc does not have a COUNTVISIBLE function, but you can use:

=SUBTOTAL(102; A1:A10)

Function code 102 means COUNT.

Count numbers with conditions (COUNTIF)

=COUNTIF(A1:A10; ">50")

Counts how many values in A1:A10 are greater than 50.

Count numbers with multiple conditions (COUNTIFS)

=COUNTIFS(A1:A100; "North"; B1:B100; ">1000")

Common Errors and Fixes

COUNT returns 0 unexpectedly

Possible causes:

  • Cells contain text instead of numbers
  • Numbers stored as text (common in imported CSV files)
  • Hidden apostrophes ('123)
  • Formulas returning text instead of numbers

Fix: Convert text to numbers:
Data → Text to Columns → OK

Err:504 — Parameter error

Occurs when:

  • A range reference is malformed
  • A non‑range argument is incorrectly formatted

COUNT ignores logical values (TRUE/FALSE)

This is expected behavior.
Use COUNTIF or SUMPRODUCT if you need to count logical values.

Best Practices

  • Use COUNT when you only want to count numeric values
  • Use COUNTA to count non‑empty cells
  • Use COUNTBLANK to count empty cells
  • Use COUNTIFS for multi‑condition counting
  • Convert imported text‑numbers to real numbers before analysis
  • Use named ranges for cleaner formulas
Named ranges make formulas easier to read and maintain.
Example: =COUNT(Sales_Entries)

Copyright 2026. All rights reserved.