Janet BN said:
Thanks John,
I was trying to use the formula Brian K wrote in response to schemr (see
other threads). Basically, I am trying to calculate the days since the
task
was supposed to have started.
We are building a template with lots of slack built in, but need to be
able
to identify if the task hasn't started, how long since it should have.
So we
can manage the slack across multiple projects - upwards of 50 at a time
(Construction).
Brian K's formula is supposed to do that I think, but I keep getting
#ERROR
and cannot see where it is - my assumption was the "Project Calendar"
field.
Formula below.
IIf([% Complete]=100,"Complete",IIf((ProjDateDiff( datevalue([Finish]),
Datevalue([Current Date]), [Project Calendar])/480)>4,"Late by 5 or
more",IIf((ProjDateDiff( datevalue([Finish]), Datevalue([Current Date]),
[Project Calendar])/480)>0,"Late by 1-4","Not Late")))
Any help appreciated.
Janet,
You're right, the formula is flawed. I'm surprised that didn't come out
in the original thread, although I admit I didn't actually read the full
thread. Brian's formula includes a field that doesn't exist and you're
also right that it is the "Project Calendar" - no such field. However,
in the formula, the default value is the active project's calendar so it
can be left out entirely unless you want to specify a specific calendar
on which to base the difference in time. If the calendar is specified,
it should be listed as a string (e.g. "standard" for the standard
calendar).
Assuming you do not have any need for a specific calendar, use the
following formula (I tested it, it now works):
IIf([%Complete]=100,"Complete",IIf((ProjDateDiff(datevalue([Finish]),Date
value([Current Date]))/480)>4,"Late by 5 or
more",IIf((ProjDateDiff(datevalue([Finish]),Datevalue([Current
Date]))/480)>0,"Late by 1-4","Not Late")))
Hope this helps.
John
Project MVP
:
Hi Marc,
I'm having a brain freeze and I suspect it's the same original
problem
you
had. How can you divide a text field by 480?
I'm obviously missing something and I know it has been a long time
since
you
worked on this, but can you tell me the answer. I've been working on
this
for a while now and running out of time.
Any help appreciated,
Cheers,
Janet,
First of all, what exactly are you trying to do?
As far as dividing a text field by "480", it depends on what is in the
text field. If it is strictly text (e.g. "Bob"), then obviously not. On
the other hand, if the text field is a customized field with a formula,
it is a simple matter of putting the correct formula in the custom
field. For example, let's say you wish to use a custom text field to
convert the Duration field, (which is actually stored internally in
minutes), to hours, the formula would be:
Text1=[Duration]/60
Hope this helps.
John
Project MVP