Add to Claude

Guides · For agents

COUNTIFS and SUMIFS on a file too big for Excel

Tools: sift_countWorks with Claude Code

Ask Sift to count the rows that meet your conditions and add up one column over them. That is COUNTIFS and SUMIFS in one call, read straight from the CSV, however many rows it has. In the test file, 8 of 24 sales lines are North and paid, worth 1,910.98.

Ask your agent

With Sift connected (setup takes three steps), paste this and swap in your own paths.

Use Sift to count the rows in /path/to/sales_lines.csv where region is North and status is paid, and total the amount column. Then do the same for status refunded in any region.

What Sift sends back

North and paid8 of 24 rows (33.3%)
Total amount1,910.98, average 318.50
Amounts left out2: one blank, one n/a
Refunded, any region5 rows, 713.48

One amount is written 1,085.50, with a thousands comma. Sift reads it as a number. The blank and the n/a are left out of the total and the average and counted, never added as 0.

What to do next

Questions

Is it case sensitive?
Yes. eq matches the value exactly, so North and north are different. Excel's COUNTIFS ignores case. List both spellings with in if you want both.
What happens to blanks and text in the column I add up?
They are left out of the total and the average, and Sift counts them and warns you. They are never treated as 0.
How big a file can it handle?
For CSV and Parquet files over 100 MB, Sift switches to its DuckDB engine, which runs the same checks as SQL and does not need the file to fit in memory. Both engines give the same numbers.

Excel stops at 1,048,576 rows. Sift reads the CSV itself, so Excel's limit does not apply. In Sift's tests, the DuckDB engine gives exactly these numbers for this file too.

More guides

Guide Contact export too big for Excel? Clean it in Large file mode Guide My CSV is too big for ChatGPT, Claude or Gemini Guide ChatGPT gave the wrong count from my CSV