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.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!