Loading...
Quick Links

Reply To: Help with VBA Formula for Status Colors

Home Forums Discussion Help with VBA Formula for Status Colors Reply To: Help with VBA Formula for Status Colors

#411660
Sai PrasadSai Prasad
Participant
  • Community Leader
  • Forum Pro

On the Yellow variable, you have subtracted [Start] from [Status Date] and [Finish] with – operator. This will not work in Formula. You need to use the function ProjDateDiff. I have combined all the formulas into one

IIf([Baseline Start]>[Status Date] And ([% Complete]=0),0,IIf([Finish]>[Baseline Finish] And ([% Complete]=0) And ([Start]>[Baseline Finish] Or [Start]=[Baseline Finish]),6,IIf([Start]>[Baseline Start] And ([% Complete]=0) And ([Finish]>[Baseline Finish] Or [Finish]=[Baseline Finish]),7,IIf([Finish]<[Baseline Finish] And ([% Complete]=0) And ([Start]>[Baseline Finish] Or [Start]=[Baseline Finish]),8,IIf([% Complete]=100,5,IIf(([Baseline Start]<[Status Date] Or [Baseline Start]=[Status Date]) And ([Start]<[Baseline Start] Or [Start]=[Baseline Start]) And ([% Complete]<100) And (([Finish]=[Baseline Finish]) Or ([Finish]<[Baseline Finish])),1,IIf(([Finish]>[Baseline Finish]) And ([% Complete]<100),4,IIf(([Baseline Start]<[Status Date] Or [Baseline Start]=[Status Date]) And ([Start]<[Baseline Start] Or [Start]=[Baseline Start]) And ([% Complete]<100) And (([Finish]=[Baseline Finish]) Or ([Finish]<[Baseline Finish])),1,IIf(([Status]=”Late”) And (([Finish]=[Baseline Finish]) Or ([Finish]<[Baseline Finish])) Or ([% Complete]>100*(Abs(ProjDateDiff([Status Date],[Start])/ProjDateDiff([Finish],[Start])))),3)))))))))