NETWORKDAYS: using correct funtion?
I went back to a previous document that was already filed by the quality
department. Without changing anything on the form and just playing with the
dates I got the desired result - negative - when the release date was later
than the due date. I was STUNNED! I modidfied the formula (below) to give me
a blank field in C8 if A8 is blank and to make C8=0 if the two dates were the
same.
I have no idea why it works in one doc but not the other. I compared the two
side by side scratching my head because they were exactly the same.
eventual solution:
=IF(A8=0,"",IF(A8=$C$5,0,NETWORKDAYS(A8,$C$5)))
C5 is Due Date
A8 is Released Date
C8 is result in days (+/-)
Senario: released date prior to due date:
C5 = 1-jan-07
A8 = 12-dec-06
C8 = 1
Senario: released date later than due date:
C5 = 1-jan-07
A8 = 2-jan=07
C8 = -1
Senario: released date equals due date:
C5 = 1-jan-07
A8 = 1-jan-07
C8 = 0
Thanks for everyones help who responded. Any idea why the docs with the
identical formulas wouldn't work the same?
AFJr
"Ron Rosenfeld" wrote:
On Wed, 28 Nov 2007 05:32:01 -0800, AFJr
wrote:
Hi,
Objective:
A work order release is received and I enter that date into cell B8.
In cell D5 resides the due date an item is due.
In cell C8 I want to calculate the days to the due date (this works). If the
date entered is later than the due date, I need to show the days late (this
appears to work except I need to show it as a negative number) and that is my
problem.
This is the formula I'm using, it resides in cell C8:
=IF(B8=0,"",(NETWORKDAYS($D$5,B8)))
Am I using the right function? If not, can someone point me in the right
direction because I am pretty much lost.
It's helpful if you give the results you are getting, along with sample inputs,
actual outputs and desired outputs. But as a rough guess
C8: =IF(B8=0,"",NETWORKDAYS(B8,$D$5))
B8: 10-Jan-07
D5: 15-Jan-07
C8: -- 4
B8: 30-Jan-07
D5: 15-Jan-07
C8: -- -12
--ron
|