0
votes

How can I sum only the total of Daily if the Date is within a range?

I used the following formulas to calculate the date range I want:
Start: SUM(CEILING(A3+1,14)-1, -11)
End: CEILING(A3+1,14)-1

For example: enter image description here

In F5, it should be $378.75. It will only calculate Daily if the dates are >=2016-02-08 and <=2016-02-19. In F9, it would have it's own total from the dates within 2016-02-22 and 2016-03-04.

The formula should work even if the dates are randomly placed along column A.

UPDATE: I got it from doing this:

=SUMIFS($F$3:$F$200,$A$3:$A$200,">="&SUM(CEILING(A3+1,14)-1, -11),$A$3:$A$200,"<="&CEILING(A3+1,14)-1)

1

1 Answers

5
votes

Use SUMIFS rather than SUMIF.

=SUMIFS(Sum_range,date_range,">"&DATECELL,date_range, "<="&DATECELL) 

Sorry am doing this from my phone or else would use your cells