Return next working day 1 week back
This tutorial shows how to return the next work day (business day) one week back using an Excel formula or VBA
Example: Return next working day 1 week back
=WORKDAY(B7-($C$4*7)-1,1,$F$7:$F$14)
|
This formula uses the Excel WORKDAY function, including the holidays, to calculate the next working day one week back from the selected date.
|
Sub Next_working_day_1_back()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'return the next working day 1 week in the future
ws.Range("C7") = WorksheetFunction.WorkDay(ws.Range("B7") - (ws.Range("C4") * 7) - 1, 1, ws.Range("F7:F14"))
ws.Range("C7") = WorksheetFunction.WorkDay(ws.Range("B7") - (ws.Range("C4") * 7) - 1, 1, ws.Range("F7:F14"))
End Sub
EXPLANATION
This tutorial shows how to return the next work day (business day) 1 week back through the use of an Excel formula or VBA.
Both the Excel formula and VBA methods make use of the WORKDAY function to return the next working day one week back.
FORMULA
=WORKDAY(date-(weeks*7)-1,1,holidays)
=WORKDAY(date-(weeks*7)-1,1,holidays)
ARGUMENTS
date: The initial date from which to begin counting the number of working days.
weeks: Number of weeks to add to or subtract from the start date.
holidays: A list of dates that specifies the holidays to take into consideration.
date: The initial date from which to begin counting the number of working days.
weeks: Number of weeks to add to or subtract from the start date.
holidays: A list of dates that specifies the holidays to take into consideration.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Return next working day | How to return the next work day (business day) using Excel and VBA | |
Return next working day 6 months in the future | How to return the next work day (business day) six months in the future using Excel and VBA | |
Return next working day 6 months back | How to return the next work day (business day) six months back using Excel and VBA | |
Return next working day 1 week in the future | How to return the next work day (business day) one week in the future using Excel and VBA |