# Handling Working Days in Excel

When working with dates in Excel at some point you will find it necessary to handle working days only. Excel provides a few useful functions to perform date calculations such as to find the number of working days between 2 dates, or the next working day after a specified date.

For the purposes of this hub we will be using a spreadsheet for a dog crate supplies company. They input the dates of orders placed and want to calculate the expected delivery date for customers (within the next 5 working days), the actual delivery date and then the number of days between the order date and delivery date highlighting any deliveries that exceed the 5 working day guarantee.

## Using the WORKDAY function

Ok, firstly we will calculate the expected delivery date. To do this we will use the WORKDAY function.

The WORKDAY function is used to return the date a specified number of working days before or after a specified date. The syntax for the function is;

=WORKDAY(start_date, days, [holidays])

Start_date – The start date for the spreadsheet below is the order date

Days – The number of days before or after the start date. In the example below 5 is entered. This calculates 5 working days after the start date. To enter a number of days before the start date you would entered the number as a negative

Holidays – This is optional and not used on the dog crate supplies sheet. Holidays would be a range of cells containing dates of non-working days you want the function to exclude

WORKDAY function calculating the expected delivery date

## Using the NETWORKDAYS function

Next is to calculate the number of working days between the order date and the delivery date. This requires the use of the NETWORKDAYS function. The syntax for the function is;

=NETWORKDAYS(start_date, end_date, [holidays])

Start_date – The start date on the sheet is the order date

End_date – The end date on the sheet is the delivery date

Holidays – A range of cells containing dates of non-working days you want the function to exclude. This argument is omitted on the spreadsheet below

Using the NETWORKDAYS function to find the number of workdays between two dates

## Installing the Analysis ToolPak

If the WORKDAY and NETWORKDAYS functions do not work, you will need to install the Analysis ToolPak in Excel. The Analysis ToolPak is an Excel Add-In providing data analysis tools.

Click the Office Button and click Excel Options

Click Add-Ins in the list on the left

Click the Go button at the bottom of the dialogue box

Tick the box for the Analysis ToolPak

Click Ok

It will take a few seconds to install. Try entering the functions again and they should work as needed.

Installing the Analysis ToolPak Excel Add-In

## Highlighting the Overdue Deliveries

Lastly we would like to highlight the deliveries that exceeded the 5 working day guarantee so that they can be easily identified. Conditional Formatting is needed to complete this task. To highlight the deliveries:

Select the cells containing the NETWORKDAYS function

Click the Conditional Formatting button on the Home tab

Select Highlight Cell Rules and then Greater Than

Enter 5 in the first box and click the drop down list arrow and select the formatting you wish to apply in the second box

Click OK

## Useful Resources

Working with dates and times

Online training videos for working with dates and times in Excel.

Excel Functions

This page is dedicated to listing the most useful Microsoft Excel functions. Explanations on how to write each function and examples of its use are provided.

## More by this Author

• 6

Form controls can be added to an Excel spreadsheet to create interactivity with the user. This article looks at using option button controls to allow a user to choose the data they want to see on a chart. The first...

• 0

If you are using pictures in your Excel spreadsheet you may be having some difficulty with sorting the pictures along with the other data in the list. The good news is that you can sort pictures in an Excel list just...

• 10

Impaction is when a bearded dragon’s digestive tract has become blocked. It is a very real hazard that is brought about when the beardie has either swallowed something that is too large, or something that it...

## 1 comment

Shalini Kagal 6 years ago from India

Very useful! Didn't realise Excel could do all that. Thank you!

Sign in or sign up and post using a HubPages Network account.

0 of 8192 characters used

No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

Alan Murray (almurray)57 Followers
71 Articles

Click to Rate This Article
working