Formula works unless there is no date and then it returns the dreaded #Invalid data type.

=IF(Helper@row = "1", "January", IF(Helper@row = "2", "February", IF(Helper@row = "3", "March", IF(Helper@row = "4", "April", IF(Helper@row = "5", "May", IF(Helper@row = "6", "June", IF(Helper@row = "7", "July", IF(Helper@row = "8", "August", IF(Helper@row = "9", "September", IF(Helper@row = "10", "October", IF(Helper@row = "11", "November", IF(Helper@row = "12", "December", IF(ISBLANK(Helper@row = "No Month", "Empty"))))))))))))))
Any ideas?
Best Answer
-
Hey sorry I re-read your formula - it was late last night and I worded the above poorly. Your syntax isn't incorrect however please see if directly correcting the MONTH function fixes the problem. That is what I meant with the above.
Another option in your Helper column:
=IF(ISDATE([Start Date]@row), MONTH([Start Date]@row, "No Month")
The IF(ISDATE([Start Date]@row) could also be added to the beginning of your nested IFs - but shouldn't be necessary if the Month column is corrected.
Kelly
Answers
-
Hey @Melitta
Do you have an IFERROR around your Month formula (the one in your Helper column) that is providing the "No Month" response? I am assuming your Invalid data type is coming from that Helper column? Is it possible to share a screenshot?
Kelly
-
-
Hey
The syntax wasn't quite right in your IFERROR. Try this instead
=IFERROR(MONTH(Start Date]@row),"No Month")
Does that work for you?
Kelly
-
Hey sorry I re-read your formula - it was late last night and I worded the above poorly. Your syntax isn't incorrect however please see if directly correcting the MONTH function fixes the problem. That is what I meant with the above.
Another option in your Helper column:
=IF(ISDATE([Start Date]@row), MONTH([Start Date]@row, "No Month")
The IF(ISDATE([Start Date]@row) could also be added to the beginning of your nested IFs - but shouldn't be necessary if the Month column is corrected.
Kelly
-
I understood what you meant. :)
It's all working. Thank you very much for your help. I appreciate it.
Help Article Resources
Categories
Check out the Formula Handbook template!