Current Friday Date of This Week using VBA Functions

VBA Current Friday

Current Friday Date using Excel VBA Functions Now, DateAdd,Format and WeekDay. We have different methods and ways to find Current Week Friday date. You can find below two specified macros or procedures to find Current week Friday date of this week using VBA functions. i.e Date, DateAdd, WeekDay and Format.

We are trying to find current week Friday date based on current or today’s date. Lets say today’s date is 13th Dec 2018 and weekday is Friday then current date of Friday should be 14th Dec 2018 and weekday is Friday. In this tutorial we have explained three methods to find Current week Friday date. To avoid using time, you can replace Date with Now. Then there is no difference in output.

Method1: Get Current Week Friday Date using VBA Functions

Let us see the first method to find current week Friday date of this week.

'Method 1: Current Friday Date using Excel VBA Functions
Sub VBA_Find_Current_Friday_Method1()
    
    Dim dCurrent_Friday As Date

    dCurrent_Friday = DateAdd("d", 8 - Weekday(Date, vbFriday), Date)

    MsgBox "If today's date is '" & Format(Now, "DD MMM YYYY") & "' then" & vbCrLf & _
    "Current Friday Date is : " & Format(dCurrent_Friday, "DD MMM YYYY"), vbInformation, "Current Week Friday Date"
    
End Sub

Method2: Get Current Week Friday Date using VBA Functions

Here is the second method to find Current week Friday date of this week.

'Method 2: Current Friday Date using Excel VBA Functions
Sub VBA_Find_Current_Friday_Method2()
    
    'Variable Declaration
    Dim dCurrent_Friday As Date
    
    dCurrent_Friday = Date - Weekday(Date, vbFriday) + 8

    MsgBox "If today's date is '" & Format(Now, "DD MMM YYYY") & "' then" & vbCrLf & _
    " Current Friday Date is : " & Format(dCurrent_Friday, "DD MMM YYYY"), vbInformation, "Current Week Friday Date"
    
End Sub

Method3: Get Current Week Friday Date using VBA Functions

Let us see the third method to find Current week Friday date of this week.

'Method 3: Current Friday Date using Excel VBA Functions
Sub VBA_Find_Current_Friday_Method3()
    
    'Variable Declaration
    Dim dCurrent_Friday As Date
    
    dCurrent_Friday = 6 - Weekday(Date) + Date

    MsgBox "If today's date is '" & Format(Now, "DD MMM YYYY") & "' then" & vbCrLf & _
    " Current Friday Date is : " & Format(dCurrent_Friday, "DD MMM YYYY"), vbInformation, "Current Week Friday Date"
    
End Sub

Output screenshot: You can find following output screenshot of above specified macros.
Current Friday Date

Instructions to Run VBA Macro Code or Procedure:

You can refer the following link for the step by step instructions.

Instructions to run VBA Macro Code

Other Useful Resources:

Click on the following links of the useful resources. These helps to learn and gain more knowledge.

VBA Tutorial VBA Functions List VBA Arrays VBA Text Files VBA Tables

VBA Editor Keyboard Shortcut Keys List VBA Interview Questions & Answers Blog

Leave a Comment