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

#411706
Megan
Guest

Thank you! I have the formula figured out except for the last line. I get a syntax error on the = signs. Any ideas??

New_EWI = _
 IIf(([Finish Variance] = 0) And ([Baseline Start] > [Status Date]) And ([% Complete] = 0), 0, _
(IIf(([Baseline Start] <= [Status Date]) And ([Start] = [Baseline Start]) And ([% Complete] < 100) And ([% Complete] > 0) And ([Finish] = [Baseline Finish]), 1, (IIf(([Baseline Start] <= [Status Date]) And ([Start] < [Baseline Start]) And ([% Complete] < 100) And ([% Complete] > 0) And ([Finish] <= [Baseline Finish]), 2, _
(IIf(([Baseline Start] <= [Status Date]) And ([% Complete] < 100) And ([% Complete] > 0) And ([Baseline Finish] > [Status Date]) And (([Finish] <= [Baseline Finish])), 3, _
(IIf(([Finish] > [Baseline Finish]) And ([% Complete] < 100) And ([Baseline Finish] >= [Status Date]) _
Or (([Start] <= [Baseline Start]) And ([% Complete] = 0) And ([Baseline Start] <= [Status Date])) _
Or (([% Complete] < 100) And ([Baseline Finish] <= [Status Date])), 4, _
(IIf([% Complete] = 100 And ([Finish] < [Status Date]), 5, _
(IIf(([Finish Variance] > 0) And ([Baseline Start] > [Status Date]) And ([% Complete] = 0) And ([Finish] > [Baseline Finish]))), 6, _
(IIf(([Finish Variance] < 0) And ([% Complete] = 0) And ([Start]) > [Status Date])), 7, _
(IIf(([% Complete] = 100) And ([Finish] > [Status Date]), 8, _
(IIf(([Baseline Finish] = ProjDateValue("NA")), 9)))))))))))))))