ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting days between dates (https://www.excelbanter.com/excel-discussion-misc-queries/15896-re-counting-days-between-dates.html)

tstorm96

Counting days between dates
 
Just wanted to add my 2 cents: this formula worked for me also, figuring
early and late shipments, where the NETWORKDAYS function kept adding an extra
day. Thank you much.

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



Hausma

This formula worked for me also - how do you exclude certain days that are
holidays and listed in a different column. Thanks so much - I have been
struggling with NETWORKDAYS for some time now.


"tstorm96" wrote:

Just wanted to add my 2 cents: this formula worked for me also, figuring
early and late shipments, where the NETWORKDAYS function kept adding an extra
day. Thank you much.

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



Hausma

I'm not sure how to exclude holidays using this formula to count the number
of working days between two dates. I want to exclude 10 specific holidays
which would normally be considered work days.

Hausma

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



Dave Peterson

Put those 10 holidays in A1:A10 of a different sheet.

Then look at the help for =networkdays().

You'll see a sample formula like:

=NETWORKDAYS(A2,A3,A4:A6)

You'd point at that other sheet:
=NETWORKDAYS(A2,A3,sheet2!A1:A10)



Hausma wrote:

I'm not sure how to exclude holidays using this formula to count the number
of working days between two dates. I want to exclude 10 specific holidays
which would normally be considered work days.

Hausma

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



--

Dave Peterson

Hausma

Dave, thanks for the quick response. I'm still having trouble getting the
formula correct. I'm am trying to determine how many on time, early and late
shipments we have. This formula seemed to give me the information that I
needed but then I realized that it was treating holidays as workdays also.
So I need to exclude these 10 days. I have entered them on a different sheet
and pointed to this sheet but I must be entering something incorrectly
because I get a paraenthesis error or #value

=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1,NETWORKDAYS(A8,B8,HOLIDAYS! A1:A10)
Am I doing this correctly?

Hausman

"Dave Peterson" wrote:

Put those 10 holidays in A1:A10 of a different sheet.

Then look at the help for =networkdays().

You'll see a sample formula like:

=NETWORKDAYS(A2,A3,A4:A6)

You'd point at that other sheet:
=NETWORKDAYS(A2,A3,sheet2!A1:A10)



Hausma wrote:

I'm not sure how to exclude holidays using this formula to count the number
of working days between two dates. I want to exclude 10 specific holidays
which would normally be considered work days.

Hausma

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



--

Dave Peterson


Dave Peterson

I would have guessed that you wanted the holidays!a1:a10 in each portion:

=IF(B8=A8,NETWORKDAYS(A8,B8,holidays!a1:a10)-1,
NETWORKDAYS(A8,B8,holidays!a1:a10)+1)
(all one cell)

Hausma wrote:

Dave, thanks for the quick response. I'm still having trouble getting the
formula correct. I'm am trying to determine how many on time, early and late
shipments we have. This formula seemed to give me the information that I
needed but then I realized that it was treating holidays as workdays also.
So I need to exclude these 10 days. I have entered them on a different sheet
and pointed to this sheet but I must be entering something incorrectly
because I get a paraenthesis error or #value

=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1,NETWORKDAYS(A8,B8,HOLIDAYS! A1:A10)
Am I doing this correctly?

Hausman

"Dave Peterson" wrote:

Put those 10 holidays in A1:A10 of a different sheet.

Then look at the help for =networkdays().

You'll see a sample formula like:

=NETWORKDAYS(A2,A3,A4:A6)

You'd point at that other sheet:
=NETWORKDAYS(A2,A3,sheet2!A1:A10)



Hausma wrote:

I'm not sure how to exclude holidays using this formula to count the number
of working days between two dates. I want to exclude 10 specific holidays
which would normally be considered work days.

Hausma

"Alex Delamain" wrote:


Try this one then


=IF(B8=A8,NETWORKDAYS(A8,B8)-1,NETWORKDAYS(A8,B8)+1)


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=265428



--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 02:14 AM.

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