How to set up calculations based on assignments?

M

Moses Bunting

I have two custom fields defined on the Resource level:
Resource.Number1 [OverheadRate] = a resource-specific multiplier
Resource.Cost1 [Cost Plus OH] = Resource.Cost * Resource.Number1

My question is, how can I set up the field Task.Cost1 to be the sum of the
Resource.Cost1 fields for each of its assignments? Since the multiplier can
differ from resource to resource, I can't just duplicate the formula in the
Task.Cost1 field definition.

First, I don't see a way to define a formula at the Assignment level, and
second, I don't see a way to define a formula to roll up assignment data at
the task or resource level.

Any help will be appreciated. Thank you.
 
J

Jan De Messemaeker

Hi,

Install and run the following macro:

Sub Cost1forTask()
Dim Job as tak
dim Yourjob as assignment
for each job in activeproject.tasks
if not job is nothing then
if not job.summary then
job.cost1=0
for each yourjob in job.assignments
job.cost1=job.cost1+yourjob.cost1
next yourjob
end if 'summary
end if 'nothing
next job
end sub

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top