COUNTIFS - Values in Multiple Columns and the Date is this month
I'm trying to calculate the number of cells in a multi column range that match a value in a cell and where the date is greater than or equal to the first of this month.
Source Data
Date1 C1 C2 C3
1/10/21 A B
1/11/21 A
New Sheet
Value
A
B
=COUNTIFS({SourceC1-C2}, HAS(@cell, [Value]@row))
------This will give me the total count with that value.
=COUNTIFS({Date1}, AND((IFERROR(MONTH(@cell), 0) = (MONTH(TODAY()))),(IFERROR(YEAR(@cell), 0) = (MONTH(TODAY())))
-----This will give me the total count of those dates.
=COUNTIFS({SourceC1-C2}, HAS(@cell, [Value]@row),{Date1}, AND((IFERROR(MONTH(@cell), 0) = (MONTH(TODAY()))),(IFERROR(YEAR(@cell), 0) = (MONTH(TODAY())))
-----This returns #INCORRECT ARGUMENT SET
-------If Value is 'A' I want 2. If Value is 'B', I want 1.
Best Answer
-
You could have a helper in the source that uses a join to concatenate all of the values into a single column, then reference that
Answers
-
Usually the incorrect argument error is a range size error. did you make sure your {sourceC1-C2} and {Date1} references contain the same number of cells?
-
Date1 is a single column. For the source I'm asking it to look at multiple columns. Maybe this isn't possible.
Date1:
Source:
-
You could have a helper in the source that uses a join to concatenate all of the values into a single column, then reference that
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!