SUM of a column between two dates
Hello. I am trying to write a formula that cross-references a sheet to calculate the sum of a column if the rows in the date column fall within a date range.
Here's a snapshot of the sheet I'm cross-referencing. I am trying to get the sum of "enrollment 1" if the "first visit" is within a certain date range or month (e.g. 4/1/2022 - 4/30/2022). I've tried a few different formulas including the one below, but I keep getting #unparseable.
=SUMIFS({ENROLLMENT 1}:{ENROLLMENT 1}, {FIRST VISIT}:{FIRST VISIT}, AND(@cell>=DATE(2022, 4, 1), @cell<=DATE(2022, 4, 30)
Answers
-
Seems like you are missing some parentheses, also a cross sheet reference just needs to be shown once. See below:
=SUMIFS({ENROLLMENT 1}, {FIRST VISIT}, AND(@cell >= DATE(2022, 4, 1), @cell <= DATE(2022, 4, 30)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!