formulastreak

SUMIFS between two dates, explained

Free, no login, no limit. Runs in your browser. Paste an Excel or Google Sheets formula and get it in plain English, step by step. Nothing you paste is sent anywhere.

In plain English

Adds up the values in D2:D20 on the rows where A2:A20 is greater than or equal to H1 and A2:A20 is less than or equal to H2.

Works in: all current Excel versions, Google Sheets

Where each function is taught

Explain this Excel formula, step by step

What each part does.

  1. 1SUMIFS=SUMIFS(D2:D20, A2:A20, ">="&H1, A2:A20, "<="&H2)= 404

    Adds up the values in D2:D20 on the rows where A2:A20 is greater than or equal to H1 and A2:A20 is less than or equal to H2.

    sum_rangeD2:D20the cells to add
    range1A2:A20the first column to check
    criteria1">="&H1what it must match
    range2A2:A20the next column to check
    criteria2"<="&H2what that must match

    From the course: SUMIFS adds the rows that match all of several conditions, like “Plants and Shipped”.

    Guide: SUMIFS: totals with conditions Lesson 19

Try it on a sample sheet

We filled the cells your formula reads with sample numbers and put the formula in J1. Type your own values (text works too) and watch the result and the steps above update.

Click a cell (or use the arrow keys) to insert its address · Enter shows the resultJ1 = 404
ABCDEFGHIJ
139404
2479876
38445
43182
56829
61566
75213
88950
93687
107334
112071
125718
139455
144192
157839
162576
176223
189960
194697
208344

What this formula does

This totals the values in D2:D20 on the rows whose date in column A falls between the two dates in H1 and H2, both included. The date column is used twice, once with “on or after” and once with “on or before”. The & joins each operator to its cell, so SUMIFS receives criteria like “>=46084”, which is how a date looks to the spreadsheet underneath. Both conditions must hold for a row to count.

When to use it

Use it for any period total: sales this month, hours last week, spend in a quarter. Keeping the dates in cells means one edit changes the period. If the data has times as well as dates, use “before the next day” for the end: "<"&H2+1.

Common mistakes

  • Writing the cell inside the quotes (">=H1"), which compares with the text H1 and returns 0.
  • Dates stored as text in the data, which never pass the comparison.

Variations

Read next

Practise this in 5 minutes

Everything this formula uses is taught in Lesson 19: SUMIFS (Unit 5, Conditional totals), on a live sheet with instant feedback. Pro

Open “SUMIFS”

Get the formulastreak newsletter

Bite-sized formula tips you can use at work the next day, plus a heads-up when new free tools and lessons land. It arrives now and then, never in a flood.

No spam, unsubscribe in one click. We store your email, this consent and when you gave it. Details in our privacy policy.

Need a quick reference? The formula cheat sheet is free to read and print.

How the formula explainer works

It reads your formula with the same engine that grades formulastreak's lessons, then describes each function in the order a spreadsheet calculates it: the innermost first. Every argument gets a name and a plain-English meaning, taken from the lesson that teaches that function.

Then it builds a small sample sheet around the cells your formula reads, so you can see what each step returns and change the numbers to test it. Nothing is uploaded: it all happens in this page.

Google Sheets formulas too

Most formulas are written the same way in Excel and Google Sheets, so the explainer reads both. Under each explanation it says which Excel versions and whether Google Sheets have every function the formula uses, from Microsoft's and Google's own function lists. Where the two differ, such as SORT's direction argument or functions Google Sheets doesn't have, the note says so.

Want to understand the errors instead? Try the Excel error decoder, or read the formula guides.

Popular formulas, explained

Questions

Which formulas can it explain?+

Any formula written for Excel or Google Sheets: it reads cell references, ranges, operators, text, nested functions, LET and LAMBDA. It describes about 150 functions in detail. If it meets a function it doesn't know yet, it says so and still explains the rest.

Does my formula leave my computer?+

No. The explanation and the sample sheet run entirely in your browser. Nothing you paste is sent to our server.

Why does it explain the formula inside-out?+

That's the order a spreadsheet works it out: the innermost functions first, then the functions that use their results. Reading it in that order makes long formulas much easier to follow.

Does it work for formulas from another sheet or workbook?+

Yes. References like Prices!A2:C9 are explained without the sheet name. Excel table references like Table1[Amount] aren't supported yet.

Is it the same in Excel and Google Sheets?+

Most formulas are. Below each explanation you'll see which versions of Excel and whether Google Sheets support every function it uses.