WORKDAY Function Examples in Excel, VBA, & Google Sheets
Written by
Reviewed by
Download the example workbook
This tutorial demonstrates how to use the WORKDAY Function in Excel to add business days.
Find Nearest Workday
To find the date of the nearest workday use the WORKDAY Function:
=WORKDAY(B3,C3)
Find Nearest Workday to Today
To find the nearest workday to today use the TODAY Function with the WORKDAY Function:
=WORKDAY(TODAY(),B3)
Find Nearest WORKDAY in 10 Days
This example will find the nearest workday 10 days from the start date:
=WORKDAY(B3,C3)
You can also use negative days to look for workdays in the past:
Workday with Holidays
By default, WORKDAYS will ignore all holidays, however, you can use a 3rd optional argument to define a range of holidays:
=WORKDAY(B3,C3,F3:F4)
WORKDAY in Google Sheets
The WORKDAY Function works exactly the same in Google Sheets as in Excel:
WORKDAY Examples in VBA
You can also use the WORKDAY function in VBA. Type:
Application.Worksheetfunction.Workday(start_date,days,holidays)
Executing the following VBA statements
Range("E2") = Application.WorksheetFunction.WorkDay(Range("B2"), Range("C2"))
Range("E3") = Application.WorksheetFunction.WorkDay(Range("B3"), Range("C3"))
Range("E4") = Application.WorksheetFunction.WorkDay(Range("B4"), Range("C4"), Range("D4"))
will produce the following results
For the function arguments (start_date, etc.), you can either enter them directly into the function, or define variables to use instead.