#### Welcome to the Smartsheet Forum Archives

The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

# Formula: Count amounts together by specific date range

Options
edited 12/09/19

Hi,

I've tried to fix it myself but I'm not getting it anymore. I want to count together on a specific date, which differs at a time.

= SUMIF (Due Date) 1, [Due Date] 5, YEAR (@cell) = 2014, Cost1: Cost5)

is based on year but I would like to select for example on 04/01/2017 to 04/20/2017 .

I hope my screenshot makes sense.

Does anyone have an idea?

• Employee
Options

Either of these should work:

=SUMIF([Due Date]1:[Due Date]6, AND(@cell >= DATE(2017, 4, 1), @cell < DATE(2017, 5, 1)), Cost1:Cost6)

or

=SUMIF([Due Date]1:[Due Date]6, AND(MONTH(@cell) = 4, YEAR(@cell) = 2017), Cost1:Cost6)

The first is better if you might want to refer to an arbitrary range, the second is explicitly looking for a month and a year.

• ✭✭
Options

What do you mean @cell?

This discussion has been closed.