Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Sumif inbetween dates

Column A has a list of dates. Column B has a list of values I want to add.

If the date is inbetween the date in C2 and D2 (including the dates of C2 and D2) then I want it to sum the value in Column B.

Any idea how to write this sumif code?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of FarWest
FarWest

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Farzad Akbarnejad
Hi,
if you don't get result from FarWest solution try this simple:

=SUMIFS(B1:B24,A1:A24,">="&C2, A1:A24, "<="&D2)

-FA
Avatar of FarWest
FarWest

sorry correct comparing cells
=SUMIFS(B3:B20,A3:A20,CONCATENATE(">=",TEXT(C2,"yyyy-mm-dd")),A3:A20,CONCATENATE("<=",TEXT(D2,"yyyy-mm-dd")))

Open in new window

I'm confused; you posted this to the Access topic area.  Did you want to do this in Access?  In Access, you would normally use the values in the first row of the spreadsheet as column headers.

Is this Excel file linked to Access?  

Did you really mean in between C2 and D2, or did you mean between the data in the relevant row of the C and D columns?