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.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 69 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!