Days between two dates

lascough

Board Regular
Joined
Oct 31, 2003
Messages
74
What I am trying to achieve is to count the number of days passed between two dates. A simple formula gives me the answer however, I need the answer not to include weekends (so Wednesday to Tuesday will = 4 NOT 6).

This will be part of a table continually filled in therefore I would also like the answer cell to remain blank and not display 0 when no dates are entered.

:eek:
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
See the NETWORKDAYS function in Excel help.

From Excel help:
NETWORKDAYS

Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.

If this function is not available, run the Setup program to install the Analysis ToolPak. After you install the Analysis ToolPak, you must enable it by using the Add-Ins command on the Tools menu.
 
Upvote 0
Try =IF(OR(A1="",B1=""),"",NETWORKDAYS(A1,B1))

Where A1 is the first date and B1 is the second date.

Note: NETWORKDAYS requires the analysis toolpak.
 
Upvote 0
Note that NETWORKDAYS counts all weekdays in the date range including start and end date so, with your example, Wednesday to the following Tuesday would give 5 using Oaktree's formula so you'll need to subtract 1
 
Upvote 0

Forum statistics

Threads
1,214,654
Messages
6,120,758
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top