Invalid Data Type Error
I have two formulas on different Grids doing the same thing. Formula 1 works, but formula 2 does not. I have double checked the data types of all references and they are the same in both formulas.
={T-Cost} * SUMIFS({T-Total}, {T-Date}, AND(MONTH(@cell) = $Month@row, YEAR(@cell) = [2024]$1))
={Tourn - Cost} * SUMIFS({Tourn - Total}, {Tourn - Date}, AND(MONTH(@cell) = $Month@row, YEAR(@cell) = [2025]$1))
I had the AI formula generator help fix my first formula, but that feature appears to be gone.
Best Answer
-
My first guess would be that the {Date Column} has blanks and/or non-date type values in there which would throw that error on the MONTH and YEAR functions. Try an IFERROR around each.
IFERROR(MONTH(@cell), 0) = $Month@row
IFERROR(YEAR(@cell), 0) = [2025]$1
Answers
-
My first guess would be that the {Date Column} has blanks and/or non-date type values in there which would throw that error on the MONTH and YEAR functions. Try an IFERROR around each.
IFERROR(MONTH(@cell), 0) = $Month@row
IFERROR(YEAR(@cell), 0) = [2025]$1
-
Thanks
I had one row in a reference where it was missing a date. That solved the problem.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 448 Global Discussions
- 145 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 73 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!