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
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!