Countifs w/ two date ranges and two different sheet
Hello All,
I am trying to count the number of projects within the same date range, but there are two different sheets I need to pull this from. I keep getting an INCORRECT ARGUEMENT SET. Here's the idea of what I have:
=COUNTIFS({Sheet1}, Criterion1 , {Sheet1 Date Range}, AND(@cell >= DATE(2023, 7, 1), @cell <= DATE(2023, 12, 31)), {Sheet2}, Criterion1, {Sheet2 Date Range}, AND(@cell >= DATE(2023, 7, 1), @cell <= DATE(2023, 12, 31)))
Here's the actual snippet:
What am I missing? Thanks!
Answers
-
@Ryan Holguin As as I know you can't reference ranges from 2 different sheets in a single function. However, what you can do is use 2 COUNTIFS and add the result together.
Like this. (I didn't check the parenthesis for any extras or missing):
=COUNTIFS({Sheet1}, Criterion1 , {Sheet1 Date Range}, AND(@cell >= DATE(2023, 7, 1), @cell <= DATE(2023, 12, 31)) + COUNTIFS( {Sheet2}, Criterion1, {Sheet2 Date Range}, AND(@cell >= DATE(2023, 7, 1), @cell <= DATE(2023, 12, 31)))
Darren Mullen, smartsheetguru.com
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 405 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!