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
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
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
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
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
- 65.2K Get Help
- 445 Global Discussions
- 142 Industry Talk
- 473 Announcements
- 5K Ideas & Feature Requests
- 84 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!