Countifs formula across sheets
I am trying to count if the UBMD Dyad (department) on the 2nd sheet (screenshot provided) is any of the ones listed on the 1st sheet and in which month(date column is on the 2nd sheet) it was completed. I was given the formula listed on the 1st sheet but the result is 0. I am not sure what is missing in the formula.
- =COUNTIFS({UBMD Dyads from Source Sheet}, [UBMD Dyads]@row, {Date from Source Sheet}, AND(IFERROR(MONTH(@cell), 0) = 11, IFERROR(YEAR(@cell), 0) = 2021))
1st sheet
2nd sheet
Answers
-
I think the "IFERROR" is messing it up and I'm not sure if it's needed. Try:
=COUNTIFS({UBMD Dyads from Source Sheet}, [UBMD Dyads]@row, {Date from Source Sheet}, AND(MONTH(@cell) = 11, YEAR(@cell) = 2021))
-
Hi
I added the formula you provided and now I am receiving an invalid error
-
The IFERROR is needed.
Exactly how are the dates populated and have you double checked that they are in fact in a date type column?
-
The dates are entered via a form and the column is setup by date type.
-
Ok. And how exactly is the UBMD Dyads column populated? Is it free text or dropdown?
-
The UBMD Dyads on the reference sheet is dropdown
-
Ok. Try copying the list from the dropdown column properties and pasting it into the cells on the formula sheet.
-
I copied the list from the drop down column and pasted it into the cells on the formula sheet but nothing changed
-
Hmm... The only thing I can think of that could be causing this then when be an issue with your ranges. Double check that they are both referencing the appropriate columns (single column each).
-
I have checked and they are both referencing the appropriate column and now the result is back to 0
-
Are people selecting a date or are they manually typing in numbers?
-
People are manually entering a date
-
Ok. Insert a temporary text/number column next to the date column. In it enter this column formula:
=IF(NOT(ISDATE(Date@row)), "Not A Date")
Are there any rows that are populated with "Not A Date" in this temporary column?
-
I added the column and entered the formula and no rows populated with "Not a Date"
-
I just noticed that the formula posted and the formula in the screenshot do not match. You need to use the one with the @cell references inside of the MONTH and YEAR functions.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!