Code Help Please

A

Arthur

Hi Group,

I don't think my original post worked, so here's
another...apologies if you got this twice.

I wrote the code below to graphically display the slippage
of my tasks depending on its status against the baseline.
Unfortunately I can't get it to run (as displayed by the
error message).

If you are able to shed some light on this for me; please
do.

Regards, Arthur.

Switch([Enterprise Project Number28]=-1,"Rvsd Comp Date
Not Set",[Enterprise Project Number28]=0,"Project at
Stage0",[Enterprise Project Number28]=1,"On Schedule",
[Enterprise Project Number28]=2,"Slippage <=30 days",
[Enterprise Project Number28]=3,"Slippage >30
days",True,"Formula has error")
 
D

Dale Howard [MVP]

Arthur --

What is the exact formula you have written in the Enterprise Project Number
28 field?
 
A

Arthur

Dale,

The code of Enterprise Project Number 28 is:

Switch([Enterprise Project Text1]="Gate0",0,([Enterprise
Project Text1]="Gate1" Or [Enterprise Project Text1]
="Gate2"),IIf([Baseline1 Finish]>#1/1/2900#,-1,IIf(Date()
<=[Baseline1 Finish],1,IIf(ProjDateDiff([Baseline1
Finish],Date())/[Minutes Per Day]<=30,2,3))),True,IIf([%
Complete]=100,IIf(DateValue([Actual Finish])<=DateValue
([Baseline1 Finish]),1,IIf(ProjDateDiff([Baseline1
Finish],[Actual Finish])/[Minutes Per Day]<=30,2,3)),IIf
([Baseline1 Finish]>#1/1/2900#,-1,IIf((Date()<=[Baseline1
Finish]) And (DateValue([Finish])<=DateValue([Baseline1
Finish])),1,IIf(((Date()>[Baseline1 Finish]) And
ProjDateDiff([Baseline1 Finish],Date())/[Minutes Per Day]
30) Or ((DateValue([Finish])>DateValue([Baseline1
Finish])) And ProjDateDiff([Baseline1 Finish],[Finish])/
[Minutes Per Day]>30),3,2)))))

-----Original Message-----
Arthur --

What is the exact formula you have written in the Enterprise Project Number
28 field?




Hi Group,

I don't think my original post worked, so here's
another...apologies if you got this twice.

I wrote the code below to graphically display the slippage
of my tasks depending on its status against the baseline.
Unfortunately I can't get it to run (as displayed by the
error message).

If you are able to shed some light on this for me; please
do.

Regards, Arthur.

Switch([Enterprise Project Number28]=-1,"Rvsd Comp Date
Not Set",[Enterprise Project Number28]=0,"Project at
Stage0",[Enterprise Project Number28]=1,"On Schedule",
[Enterprise Project Number28]=2,"Slippage <=30 days",
[Enterprise Project Number28]=3,"Slippage >30
days",True,"Formula has error")


.
 
S

Sumit

Dear Arthur,

I am not an expert on this but my first hand exp says that you have written
a very complicated formula. if you can tell the scenario then may be i can
try one for you.

Few things:
1. Has baseline 1 been saved?
2. Why have you used this value #1/1/2900# ?

Regards,
Sumit.

Arthur said:
Dale,

The code of Enterprise Project Number 28 is:

Switch([Enterprise Project Text1]="Gate0",0,([Enterprise
Project Text1]="Gate1" Or [Enterprise Project Text1]
="Gate2"),IIf([Baseline1 Finish]>#1/1/2900#,-1,IIf(Date()
<=[Baseline1 Finish],1,IIf(ProjDateDiff([Baseline1
Finish],Date())/[Minutes Per Day]<=30,2,3))),True,IIf([%
Complete]=100,IIf(DateValue([Actual Finish])<=DateValue
([Baseline1 Finish]),1,IIf(ProjDateDiff([Baseline1
Finish],[Actual Finish])/[Minutes Per Day]<=30,2,3)),IIf
([Baseline1 Finish]>#1/1/2900#,-1,IIf((Date()<=[Baseline1
Finish]) And (DateValue([Finish])<=DateValue([Baseline1
Finish])),1,IIf(((Date()>[Baseline1 Finish]) And
ProjDateDiff([Baseline1 Finish],Date())/[Minutes Per Day]
30) Or ((DateValue([Finish])>DateValue([Baseline1
Finish])) And ProjDateDiff([Baseline1 Finish],[Finish])/
[Minutes Per Day]>30),3,2)))))

-----Original Message-----
Arthur --

What is the exact formula you have written in the Enterprise Project Number
28 field?




Hi Group,

I don't think my original post worked, so here's
another...apologies if you got this twice.

I wrote the code below to graphically display the slippage
of my tasks depending on its status against the baseline.
Unfortunately I can't get it to run (as displayed by the
error message).

If you are able to shed some light on this for me; please
do.

Regards, Arthur.

Switch([Enterprise Project Number28]=-1,"Rvsd Comp Date
Not Set",[Enterprise Project Number28]=0,"Project at
Stage0",[Enterprise Project Number28]=1,"On Schedule",
[Enterprise Project Number28]=2,"Slippage <=30 days",
[Enterprise Project Number28]=3,"Slippage >30
days",True,"Formula has error")


.
 
A

Arthur

Hi Sumit,

The code does a comparison of the baselined dates to
identify the degree of slippage incurred in the project.

Yes, the baseline has been saved. I have chosen this date
as it is the last feasible in Project.

Regards, Arthur
-----Original Message-----
Dear Arthur,

I am not an expert on this but my first hand exp says that you have written
a very complicated formula. if you can tell the scenario then may be i can
try one for you.

Few things:
1. Has baseline 1 been saved?
2. Why have you used this value #1/1/2900# ?

Regards,
Sumit.

Arthur said:
Dale,

The code of Enterprise Project Number 28 is:

Switch([Enterprise Project Text1]="Gate0",0, ([Enterprise
Project Text1]="Gate1" Or [Enterprise Project Text1]
="Gate2"),IIf([Baseline1 Finish]>#1/1/2900#,-1,IIf(Date ()
<=[Baseline1 Finish],1,IIf(ProjDateDiff([Baseline1
Finish],Date())/[Minutes Per Day]<=30,2,3))),True,IIf ([%
Complete]=100,IIf(DateValue([Actual Finish])<=DateValue
([Baseline1 Finish]),1,IIf(ProjDateDiff([Baseline1
Finish],[Actual Finish])/[Minutes Per Day]<=30,2,3)),IIf
([Baseline1 Finish]>#1/1/2900#,-1,IIf((Date()<= [Baseline1
Finish]) And (DateValue([Finish])<=DateValue([Baseline1
Finish])),1,IIf(((Date()>[Baseline1 Finish]) And
ProjDateDiff([Baseline1 Finish],Date())/[Minutes Per Day]
30) Or ((DateValue([Finish])>DateValue([Baseline1
Finish])) And ProjDateDiff([Baseline1 Finish],[Finish])/
[Minutes Per Day]>30),3,2)))))

-----Original Message-----
Arthur --

What is the exact formula you have written in the Enterprise Project Number
28 field?




"Arthur" <[email protected]> wrote
in
message
Hi Group,

I don't think my original post worked, so here's
another...apologies if you got this twice.

I wrote the code below to graphically display the slippage
of my tasks depending on its status against the baseline.
Unfortunately I can't get it to run (as displayed by the
error message).

If you are able to shed some light on this for me; please
do.

Regards, Arthur.

Switch([Enterprise Project Number28]=-1,"Rvsd Comp Date
Not Set",[Enterprise Project Number28]=0,"Project at
Stage0",[Enterprise Project Number28]=1,"On Schedule",
[Enterprise Project Number28]=2,"Slippage <=30 days",
[Enterprise Project Number28]=3,"Slippage >30
days",True,"Formula has error")



.
.
 
Top