Hi Tony,
The function isn't designed to work quite the way you're using it. You appear to have each project's predecessor completion dates being evaluated against the project's completion date. The way the code is written, if no predecessors are specified, the project is assumed to be its own predecessor. In all cases, the code tests against a date that's been input into another cell. If you use the project's completion date for this, then that's what the completion will be tested against. You can make it more flexible in this regard by having a 'default' date in another cell and adding an IF test to the expression. For example:
=RiskTest(J2,A:A,F:F,IF(J2="",G$35,G2))
where the 'default' date (today) is in G35. If you do that, I believe you'll get the results you're after. Plus, you can specify other dates if/when the need arises.
I note that on row 9, you have a value in column K but not in column J. Be careful with that: if there is nothing in column J, column K will not be tested.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|