Incorrect result in comparing dates in SUMIFS function in google sheets

Viewed 52

Google Sheet:

enter image description here

Formula: =SUMIFS(B2:B4,A2:A4,">="&E3,A2:A4,"<="&E4)

I need to add the quantities which are between the given dates. But the "<=" is not working properly in comparing dates.

1 Answers

Add time with dates so that it can compare with date time values. Try-

=SUMIFS(B1:B3,A1:A3,">="&E3+TIME(0,0,1),A1:A3,"<="&E4+TIME(23,59,59))

enter image description here

Related