I have this function saved as a macro:
Function getWeekdayStartDate(ActualDate As Date) As Date
Dim WeekdayStartDate As Date
WeekdayStartDate = DateValue(DateAdd("d", -Weekday(ActualDate, vbFriday) + 1, ActualDate))
getWeekdayStartDate = WeekdayStartDate
End Function
This gives me a date that is the first day of the accountant period. The first day of this week is not Monday, but Friday.
I tried these formulas:
=DATE(2016; 6; 1)-WEEKDAY(DATE(2016; 6; 1)-6)
=DATE(2016;6;24)+1-WEEKDAY(DATE(2016;6;24);15)
to get this date, but no luck.
Any ideas on how to convert this function to an excel formula?
source
share