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
- 10.7K Get Help
- 63 Global Discussions
- 68 Industry Talk
- 385 Announcements
- 3.5K Ideas & Feature Requests
- 55 Brandfolder
- 125 Just for fun
- 50 Community Job Board
- 464 Show & Tell
- 40 Member Spotlight
- 44 Power Your Process
- 28 Sponsor X
- 234 Events
- 7.3K Forum Archives
Check out the Formula Handbook template!