Google Sheets Guide · Prompt: “Sum Expenses in C2:C6 where Date in B2:B6 is in Q1 2026 and Category in D2:D6 is "Cloud"”

Google Sheets SUMIFS Date Range Formula Guide

Verified by LiveFormulaLab Engineering Team • Updated November 2026

Sum Google Sheets values between two dates with SUMIFS or QUERY. Copy the verified syntax and test live in our interactive spreadsheet.

Verified Google Sheets Syntax

=SUMIFS(C2:C6, B2:B6, ">=2026-01-01", B2:B6, "<=2026-03-31", D2:D6, "Cloud")

How This Formula Works (Step-by-Step)

Google Sheets evaluates ISO date strings (YYYY-MM-DD) reliably inside SUMIFS when paired with >= and <= operators.

Step 1: Place the sum range C2:C6 first.

Step 2: Add the start date bound, end date bound, and category condition "Cloud".

Formula Syntax & Arguments Breakdown

Combines inclusive start/end date comparisons with category filters inside Google Sheets SUMIFS to slice metrics over exact quarterly or monthly windows.

Argument / ClauseRequirementData TypeRole & Behavior
sum_range (C2:C6)RequiredNumeric RangeColumn of revenue, spend, or quantity values summed when all conditions match.
criteria_range1 & criteria1 (B2:B6, ">=2026-01-01")RequiredDate FilterLower inclusive date boundary tested against true Sheet dates.
criteria_range2 & criteria2 (B2:B6, "<=2026-03-31")RequiredDate FilterUpper inclusive date boundary bounding the same date column.
criteria_range3 & criteria3 (D2:D6, "Cloud")OptionalCategory FilterExtra segment, status, or product-line filter applied via logical AND.

3 Real-World Use Cases

  • Summarizing quarterly AWS/GCP cloud infrastructure spend.
  • Tracking monthly paid acquisition spend by channel.
  • Rolling up payroll reimbursements within each pay cycle.

Cross-Platform Equivalents

Excel
=SUMIFS(C2:C6, B2:B6, ">=2026-01-01", B2:B6, "<=2026-03-31", D2:D6, "Cloud")
SQL
SELECT SUM(cost) FROM expenses WHERE date BETWEEN '2026-01-01' AND '2026-03-31' AND category = 'Cloud';
Python Pandas
df[(df['Date'].between('2026-01-01', '2026-03-31')) & (df['Category'] == 'Cloud')]['Cost'].sum()

Common Mistakes & Pro Tips

Pitfalls & How to Fix Them

  • Mistake: Google Sheets fails with #VALUE! if sum_range and any criteria_range have different row lengths.

    Fix: Verify every range covers identical row coordinates (for example C2:C6, B2:B6, D2:D6).

  • Mistake: Comparing date strings in MM/DD/YYYY format breaks when the spreadsheet locale is set to UK or EU.

    Fix: Use DATE(2026, 1, 1) or ISO "2026-01-01" strings inside SUMIFS so locale changes never shift day/month order.

  • Mistake: Imported Google Form timestamps contain time-of-day, causing <= end date to drop transactions on the final day.

    Fix: Compare with "<"&(EndDateCell+1) or normalize timestamps with INT(B2:B6).

Engineering Pro Tips

  • Bind criteria to dashboard filter cells cleanly: ">="&TEXT(E2,"yyyy-mm-dd").
  • When summarizing open-ended datasets, use closed columns trimmed by a helper or QUERY instead of slow volatile formulas.
  • Pair SUMIFS with COUNTIFS using the exact same criteria arguments to compute conditional Average Deal Size.

Frequently Asked Questions

Can I reference start/end date cells in Google Sheets?
Yes: use ">=" & F1 and "<=" & G1 where F1 and G1 contain valid dates.
How does Google Sheets QUERY handle date ranges?
QUERY requires literal dates formatted as date 'yyyy-mm-dd' inside the SQL-like string.
Why use YYYY-MM-DD instead of MM/DD/YYYY?
ISO YYYY-MM-DD dates work across US and European sheet locale settings without flipping month and day.

Related Formulas & Guides