vendredi 10 février 2017

Excel - Get Week Day Start Date as formula

Vote count: 0

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

It gives me a date which is the first day of the accountant period kinda. First day of this week is not monday, it's 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 with no luck. Any ideas how to convert this function to formula?

asked 27 secs ago

Let's block ads! (Why?)



Excel - Get Week Day Start Date as formula

Aucun commentaire:

Enregistrer un commentaire