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
Check out the Formula Handbook template!