Tracey
Hi
I carry out two types of reports - one in MSp and one in excell. the MSP is
a bar chart, but has a planned % based on the "status Date" Basically I
insert the baseline start and finish columns with a Planned % column in
between the column is a customised number field. I then run a macro after
updating the project status field.
Macro
Sub trial_percentg()
' Macro trial_percentg
' Macro Recorded 19/09/2005 by Simons Construction Ltd.
'Get the current date.
dCurrentDate = ActiveProject.StatusDate
'Loop through each task in the project
For Each ATask In ActiveProject.Tasks
PlPctComp = 0
'skip blank rows
If Not ATask Is Nothing Then
'Check for Start and Finish
If (IsDate(ATask.BaselineStart) And _
IsDate(ATask.BaselineFinish)) Then
'Zero duration tasks
If dCurrentDate >= ATask.BaselineFinish Then
PlPctComp = 100
Else
vTemp = Application.DateDifference(ATask.BaselineStart, _
ATask.BaselineFinish)
If vTemp = 0 Then
PlPctComp = 0
Else
PlPctComp =
Format(Application.DateDifference(ATask.BaselineStart, _
dCurrentDate) / vTemp) * 100
PlPctComp =
Round(Format(Application.DateDifference(ATask.BaselineStart, _
dCurrentDate) / vTemp) * 100)
End If
End If
ATask.Number18 = PlPctComp
End If
End If
Next ATask
End Sub
In excell I creat an S curve as you do and use a formula, again inbetween
the two date fields I format the fields as a number with no decimal points
and add the following formula
=IF(P64<1/1/80,0,IF(DATE>=P64,100,IF(DATE<N64,0,((DATE-N64)*100)/(P64-N64+1))))
I appreciate that both seem quite complicated, but they do work.
Hope this helps
Andrew