ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calculate weekdays from two dates (https://www.excelbanter.com/excel-programming/279796-calculate-weekdays-two-dates.html)

JZ[_2_]

Calculate weekdays from two dates
 
Hello everyone.

I have a column of "begining" dates and another column
with "ending" dates. I'd like Excel to calculate the
weekdays between the two dates. For example, in the first
cell in column A I would have 10/01/03 and in the first
cell of column B I would have 10/16/03. I'd like Excel to
give me the number of weekdays within this time span,
which in this case would be 12. BUT, if the the "ending"
date is empty I'd like Excel to provide "today's" date.

I don't know if this can be done. Any help any of you
could provide would be very much appreciated.

JZ

Chip Pearson

Calculate weekdays from two dates
 
Try something like

=NETWORKDAYS(A1,IF(B1="",TODAY(),B1))

The NETWORKDAYS function requires that the Analysis Tool Pack add-in be
loaded. If it is not, you'll get a #NAME error.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JZ" wrote in message
...
Hello everyone.

I have a column of "begining" dates and another column
with "ending" dates. I'd like Excel to calculate the
weekdays between the two dates. For example, in the first
cell in column A I would have 10/01/03 and in the first
cell of column B I would have 10/16/03. I'd like Excel to
give me the number of weekdays within this time span,
which in this case would be 12. BUT, if the the "ending"
date is empty I'd like Excel to provide "today's" date.

I don't know if this can be done. Any help any of you
could provide would be very much appreciated.

JZ





All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com