The dreaded #invalid data type
Hi guys,
I'm progressing with my basic formula however what do i need to add into the below formula as an example so i don't get the unsightly #invalid data type in a cell just because the start date is blank?
=IF(MONTH([Start Date]@row) = 1, "January", IF(MONTH([Start Date]@row) = 2, "February", IF(MONTH([Start Date]@row) = 3, "March", IF(MONTH([Start Date]@row) = 4, "April", IF(MONTH([Start Date]@row) = 5, "May", IF(MONTH([Start Date]@row) = 6, "June", IF(MONTH([Start Date]@row) = 7, "July", IF(MONTH([Start Date]@row) = 8, "August", IF(MONTH([Start Date]@row) = 9, "September", IF(MONTH([Start Date]@row) = 10, "October", IF(MONTH([Start Date]@row) = 11, "November", IF(MONTH([Start Date]@row) = 12, "December"))))))))))))
Answers
-
IFERROR. Toss that in the front and the value you want if an error occurs at the end. I just put 0. You could put "" to leave it blank
=IFERROR(IF(MONTH([start date]@row) = 1, "January", IF(MONTH([start date]@row) = 2, "February", IF(MONTH([start date]@row) = 3, "March", IF(MONTH([start date]@row) = 4, "April", IF(MONTH([start date]@row) = 5, "May", IF(MONTH([start date]@row) = 6, "June", IF(MONTH([start date]@row) = 7, "July", IF(MONTH([start date]@row) = 8, "August", IF(MONTH([start date]@row) = 9, "September", IF(MONTH([start date]@row) = 10, "October", IF(MONTH([start date]@row) = 11, "November", IF(MONTH([start date]@row) = 12, "December")))))))))))), 0)
-
Thanks Dan,
I understand now appreciate your help.
I tweaked the formula to the below so it just leaves it blank.
=IFERROR(IF(MONTH([start date]@row) = 1, "January", IF(MONTH([start date]@row) = 2, "February", IF(MONTH([start date]@row) = 3, "March", IF(MONTH([start date]@row) = 4, "April", IF(MONTH([start date]@row) = 5, "May", IF(MONTH([start date]@row) = 6, "June", IF(MONTH([start date]@row) = 7, "July", IF(MONTH([start date]@row) = 8, "August", IF(MONTH([start date]@row) = 9, "September", IF(MONTH([start date]@row) = 10, "October", IF(MONTH([start date]@row) = 11, "November", IF(MONTH([start date]@row) = 12, "December")))))))))))), "")
-
Cool deal happy to help!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!