sorry to hijack this thread but as I have an issue similar to this but have a formula on premise which works and want it to work in o365, I thought I'd add it.
It calculates from the current date the date of the previous friday:
=IF(WEEKDAY([Current Date])<6,[Current Date]-(11-WEEKDAY([Current Date])),[Current Date]+5-WEEKDAY([Current Date]))
However, I'm a bit stumped as to how to imp[lement it in the same\similar way as to how you solved this one with your formula.
Any help would be much appreciated.