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
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!