Highlighting Weekend Dates
I saw a few threads about a formula that highlights weekend dates. A formula that I've seen is
=IF(OR(WEEKDAY([Date Column]@row) = 1, WEEKDAY([Date Column]@row) = 7), "Weekend")
and I've tried that, but I keep getting the error that says 'Invalid Data Type'. Anyone know why this may be happening?
Best Answer
-
My guess would be there are some blanks in your dataset. I would suggest wrapping the WEEKDAY portions in an IFERROR.
=IF(OR(IFRROR(WEEKDAY([Date Column]@row), 0) = 1, IFERROR(WEEKDAY([Date Column]@row), 0) = 7), "Weekend")
Answers
-
Did you use a Text/number data type for your helper column? Is your Date column set up as date type?
...
-
My guess would be there are some blanks in your dataset. I would suggest wrapping the WEEKDAY portions in an IFERROR.
=IF(OR(IFRROR(WEEKDAY([Date Column]@row), 0) = 1, IFERROR(WEEKDAY([Date Column]@row), 0) = 7), "Weekend")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!