Excel 2019 Bible

(singke) #1

Part II: Working with Formulas and Functions


The WORKDAY.INTL function returns a workday date based on the number of days you tell
it to increment. This function has two required arguments and two optional arguments:

Start Date (required) This argument is the date to start from.
Days (required) This argument is the number of days from the start date that you want
returned.
Weekends (optional) By default, the WORKDAY.INTL function excludes Saturdays and
Sundays, but this third argument allows you to specify which weekdays to exclude as a
weekend day. As you enter the WORKDAY.INTL function, Excel displays a menu where you
can select the appropriate weekend code.
Holidays (optional) This argument allows you to give Excel a list of dates to exclude in
addition to the weekend days.
In this example, we are telling Excel to start from 12/31/2012 and then increment up 1 to
give us the next business day after our start date. For our optional arguments, we specify
that we need to exclude Saturdays and Sundays, along with the holidays listed in cells
$D$4:$D$15.
=WORKDAY.INTL(B3,1,1,$D$4:$D$15)

Be sure to lock down the range for your list of holidays with absolute references so that it
remains locked as you copy your formula down.

Extracting parts of a date
Although it may seem trivial, it’s often helpful to pick out a specific part of a date. For
example, you may need to filter all records that have order dates within a certain month or
all employees who have time allocated to Saturdays. In these situations, you would need to
pull out the month and workday number from the formatted dates.

Excel provides a simple set of functions to parse dates out into their component parts.
These functions are as follows:

YEAR extracts the year from a given date.
MONTH extracts the month from a given date.
DAY extracts the month day number from a given date.
WEEKDAY returns the weekday number for a given date.
WEEKNUM returns the week number for a given date.

Figure 12.6 demonstrates the use of these functions to parse the date in cell C3 into its
component parts.

These functions are fairly straightforward.

The YEAR function returns a four-digit number that corresponds to the year of a specified
date. This formula returns 2015.

=YEAR("5/16/2015")
Free download pdf