INDEPENDENT SOFTWARE JOURNAL
TrebuchetJOURNAL
EST. 2026 · DIGITAL EDITIONExplore guides
LIBREOFFICE · CALC · HOW-TO GUIDE

SUMIF and COUNTIF in LibreOffice Calc, with Examples

Summarize expenses by category and count matching records without manually filtering every row.

Summarize expenses by category and count matching records without manually filtering every row. This tutorial focuses on a repeatable real-world task you can test on a sample file, not an unverified performance claim. LibreOffice is a desktop office suite; application menus and options may differ by operating system and release.

How to do it: a practical workflow

Work on a copy of your files when learning a new application. The sequence below gives you a testable outcome and a way to verify the result.

  1. Step 1. Prepare a table with Date, Category and Amount columns, with one record per row.
  2. Step 2. Use SUMIF to total values where the category matches one label such as Travel.
  3. Step 3. Use COUNTIF to count records meeting a condition. For multiple criteria, explore SUMIFS and COUNTIFS.
  4. Step 4. Keep categories consistent and check for accidental leading or trailing spaces in imported data.
  5. Step 5. Reconcile one formula result with a filtered set of rows so you know the criteria work as intended.

Worked example you can recreate

Try this on a sample file

Suppose B2:B20 stores categories and C2:C20 amounts. =SUMIF(B2:B20;"Travel";C2:C20) totals travel expenses. =COUNTIF(B2:B20;"Travel") counts travel rows. The semicolon separator reflects a common Calc locale.

Common problems and what to verify

Criteria matching and wildcard behavior can depend on application options. For financial reporting, validate totals against the underlying rows.

Before handing a document to someone else, open the output in the format that person will use. Check the content and key calculations rather than relying on an export-success notification.

Quick answer

Can I sum several conditions at once?

Yes, SUMIFS is designed for multiple criteria, subject to the function syntax and Calc version.

Official reference and download

These instructions draw on documentation from The Document Foundation. For current user-interface details, refer to the official guide for this topic ↗. Download installation files only from LibreOffice's official download page ↗.

Keep learning

Each of these related guides answers a different task, so you can move from basic setup to a more specific workflow without repeating the same overview.

Independent educational coverage. Trebuchet is not affiliated with or endorsed by The Document Foundation. This article describes documented workflows and illustrative examples; it is not a report of hands-on benchmarking or testing.