Philip McQuitty
Philip McQuitty

Reputation: 1077

Sumif Between Dates in Excel Not Working

I am trying to return/sum-if the "total bonus" in column F if the "effective date" is in between the two dates listed in cells G2 and H2. My current formula is returning a "0". What is wrong here?

Formulas are set to automatic in settings.

enter image description here

Upvotes: 1

Views: 1703

Answers (2)

coreuter
coreuter

Reputation: 3572

If you want to use SUMIF you first have to sum everything after the first date (1/1/15) and then subtract everything after the second date (1/1/16)

=SUMIF($E$3:$E$5,">="&G2,$F3:F$5)-SUMIF($E3:$E5,">"&$H$2,$F$3:$F$5)

Which in this case results to 7750.

Another possibility is to use SUMIFS:

=SUMIFS($F$3:$F$5,$E$3:$E$5,">="&G2,$E$3:$E$5,"<="&H2)

Upvotes: 2

user4039065
user4039065

Reputation:

Try a SUMIFS,

=sumifs(f$3:f$5, e$3:e$5, ">="&$g$2, e$3:e$5, "<="&$h$2)

Upvotes: 1

Related Questions