Invalid Data when wanting to count blanks
Hi all,
I have a roll up sheet where I'm referencing another sheet to get some metrics. One of them is to count which grouping a building belongs to and since I know sometimes the building doesn't always have a grouping, I wanted to include a count of those unassigned buildings. But when I try a "" or a ISBLANK(@cell), it comes up with an Invalid Data type. Here's my formula:
=COUNTIFS({Grouping}, "", {Extract}, MONTH(@cell) = Month@row, {Extract}, YEAR(@cell) = Year@row)
What is odd about it too is that this seems to be specific to the COUNTIFS formula since I have another one that is written virtually the same, except it is a SUMIFS:
=SUMIFS({RSF}, {Grouping}, "", {Extract}, MONTH(@cell) = Month@row, {Extract}, YEAR(@cell) = Year@row)
Anyone have any thoughts?
Best Answer
-
Hi @kioshi43
It may actually be the MONTH and YEAR functions giving you the error, not the "". Sometimes these functions can return an error if they're reading blank cells or cells with text in them. Try (in both of your formulas) wrapping an IFERROR around each one:
=COUNTIFS({Grouping}, "", {Extract}, IFERROR(MONTH(@cell), 0) = Month@row, {Extract}, IFERROR(YEAR(@cell), 0) = Year@row)
and
=SUMIFS({RSF}, {Grouping}, "", {Extract}, IFERROR(MONTH(@cell), 0) = Month@row, {Extract}, IFERROR(YEAR(@cell), 0) = Year@row)
Let me know if that helped!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Hi @kioshi43
It may actually be the MONTH and YEAR functions giving you the error, not the "". Sometimes these functions can return an error if they're reading blank cells or cells with text in them. Try (in both of your formulas) wrapping an IFERROR around each one:
=COUNTIFS({Grouping}, "", {Extract}, IFERROR(MONTH(@cell), 0) = Month@row, {Extract}, IFERROR(YEAR(@cell), 0) = Year@row)
and
=SUMIFS({RSF}, {Grouping}, "", {Extract}, IFERROR(MONTH(@cell), 0) = Month@row, {Extract}, IFERROR(YEAR(@cell), 0) = Year@row)
Let me know if that helped!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Appreciate the help, thank you! Sorry, I didn't realize I hadn't replied ugh
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!