Invalid data type error
Hi,
My formula is =COUNTIF({Range 1}, AND(MONTH(@cell) = 3)) and i am trying to count the number of dates in march. my date column (Range 1) is 03/01/22
I am getting a invalid data type error.
thanks for your help.
Peggy
Best Answer
-
Hey @Peggy
To clarify, your Range 1 is the entire Date column, correct? It shouldn't be just a single cell. If it is the single cell, delete the Range 1 completely from this formula, click the Insert Reference and go back to the source sheet and insert the entire column by clicking the column header.
Try this
=COUNTIFS({source sheet entire date column}, IFERROR(MONTH(@cell),0)=3)
I added an IFERROR in the event a non-date was in your date column. This will prevent the cell from causing the entire calculation to fail.
Kelly
Answers
-
Hey @Peggy
To clarify, your Range 1 is the entire Date column, correct? It shouldn't be just a single cell. If it is the single cell, delete the Range 1 completely from this formula, click the Insert Reference and go back to the source sheet and insert the entire column by clicking the column header.
Try this
=COUNTIFS({source sheet entire date column}, IFERROR(MONTH(@cell),0)=3)
I added an IFERROR in the event a non-date was in your date column. This will prevent the cell from causing the entire calculation to fail.
Kelly
-
To clarify, your Range 1 is the entire Date column, correct? correct
this worked, thank you Kelly!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 447 Global Discussions
- 144 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 72 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!