#Error message

C

CTJ

Hello all,

Here is my problem, I hope you got a solution for me.

I use a formule to compare 2 dates : initial projected start day and real
Start day

--------- DateDiff("d";[Projected Start date];[Start Date]) -----------------

It's OK for all my tasks. But some tasks are new and don't have a "projected
start date". So MS Project answer #Error. Instead of #Error I would like to
have a "0".

What can I do ?

Thanks
 
J

JulieS

Hello CTJ,

You need to test for the Projected Start date field being equal to "NA".

The formula below uses [Date1] in place of the [Projected Start Date]
and [Start] in place of the [Start Date] field. You may also need to
replace commas (,) with semicolons (;) as I am using a US install and
the separator is a comma.

IIf([Date1]=ProjDateValue("NA"),0,DateDiff("d",[Date1],[Start]))

I *think* the version that should work given your custom fields:

IIf([Projected Start date]=ProjDateValue("NA");0;DateDiff("d",[Projected
Start date];[Start Date]))

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top