# [help] Using SUMIF formula to calculate the sum of a column if between certain dates

edited 01/03/20

Hey y'all!

Here's what I have so far:

=SUMIF({GRAD Student - Support Request Range Complete Date}, AND(<=DATE(2019, 5, 9), >=DATE(2019, 1, 7)), {GRAD Student - Support Request Time Spent Range})

Complete Date = the date range I'm trying to pull from

After the "And"= The range I want for the dates.

Time Spent = The location of the data I want to be totaled.

When I put this formula in, I get an Invalid Operation error. Any help would be appreciated.

EDIT: Figured it out by myself.

Should've been using the SUMIFS formula.

My final formula is as such:

=SUMIFS({GRAD Student - Support Request Time Spent Range}, {GRAD Student - Support Request Range Complete Date}, >=DATE(2019, 1, 7), {GRAD Student - Support Request Range Complete Date}, <=DATE(2019, 5, 9))

Tags:

• ✭✭✭✭✭✭

Glad you got it working. You can also use your original formula with the AND statement with only minor adjustment. I like to use AND like this when I am referencing the same range for multiple criteria sets so that it helps keep things a little more organized (for me at least).

The problem is that the AND requires logical statements. "This equals that" or "This is less than or equal to that", etc... So you would need to use @cell references.

=SUMIFS({Range}, AND(@cell <= DATE(......), @cell >= DATE(.....))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!