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, join the Smartsheet Guru Elite
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 443 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 129 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!