How to update a formula to automatically populate for the prior Monday to a cell date
Hi! I have the following formula from the discussion board (shoutout to Craig) for automatically populating the Monday prior to a certain date:
=IF(ISDATE(Date@row), IF(WEEKDAY(Date@row) = 1, Date@row - 6, Date@row - WEEKDAY(Date@row) + 2))
What do I need to change on this to have it calculate the FRIDAY prior?
I'm sure it's in the numbers, I just don't quite get it :)
Thank you!
Best Answer
-
My bad. Try this one:
=IF(ISDATE(Date@row), IF(WEEKDAY(Date@row) < 6, Date@row - (WEEKDAY(Date@row) + 1), Date@row - WEEKDAY(Date@row) + 6))
Answers
-
=IF(ISDATE(Date@row), IF(WEEKDAY(Date@row) = 1, Date@row - 2, Date@row - WEEKDAY(Date@row) + 6))
-
Thank you Joanna! I am still having trouble with that once it gets to Monday, it goes to the following Friday, not the Friday prior. Attached my info for reference in case I messed up somewhere :)
-
My bad. Try this one:
=IF(ISDATE(Date@row), IF(WEEKDAY(Date@row) < 6, Date@row - (WEEKDAY(Date@row) + 1), Date@row - WEEKDAY(Date@row) + 6))
-
YES!!!!! That works! Thank you so very much! You are amazing!! :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!