• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 75
  • Last Modified:

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!
0
cansevin
Asked:
cansevin
  • 2
1 Solution
 
FarWestCommented:
check this
=SUMIFS(B3:B20,A3:A20,CONCATENATE(">=",TEXT(C1,"yyyy-mm-dd")),A3:A20,CONCATENATE("<=",TEXT(C2,"yyyy-mm-dd")))

Open in new window

0
 
Farzad AkbarnejadDeveloperCommented:
Hi,
if you don't get result from FarWest solution try this simple:

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

-FA
0
 
FarWestCommented:
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

0
 
Dale FyeCommented:
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?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now