Calculating Costs with inflation

D

DGD

I have a project based upon services rates that covers a period of 6
years. I have created labour rates and adjusted them by 3%/year over
the base rate, starting at the start of every new calendar year. I
also have a macro that calculates in a cost field the costs associated
with resources identified as "work" and another macro that does the
same thing for resources identified as material. The problem I am
having is that the macro only uses the standard rate for all years of
the project and does not use the inflated rates for any year beyond
year one for both "work" and "material" resources. The loop in the
"work" macro is as follows:

For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
t.Cost4 = 0
For Each a In t.Assignments
If a.ResourceType = pjResourceTypeWork Then
RRate =
Mid(ActiveProject.Resources(a.ResourceID).StandardRate, 2,
Len(ActiveProject.Resources(a.ResourceID).StandardRate) - 4)
t.Cost4 = t.Cost4 + a.Work / 60 * RRate
End If
Next a
End If
Next t

To me the offending line is the "RRate =............." because it only
uses one rate for the entire project. How would I get it to look at
rates associated with year 2, year 3, year 4 etc, as opposed to only
the rate associated with year 1? Any help appreciated.


Doug
 
R

Rod Gill

You don't actually need a macro to do this. In the resource sheet,
double-click each resource and select the costs tab. Add a new rate valid
from the new year and another from the next year and so on. Project
calculates cost of all work using the rate for that period.

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 
D

DGD

You don't actually need a macro to do this. In the resource sheet,
double-click each resource and select the costs tab. Add a new rate valid
from the new year and another from the next year and so on. Project
calculates cost of all work using the rate for that period.

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx

---------------------------------------------------------------------------­-------------------------









- Show quoted text -

That is exactly what I have done, but the macro does not address the
resource rate as it changes from period to period. I use the macros
to identify what my labour costs are and what my material costs are
separately. There is only one field in Project that does that
calcuation and that is the cost field (which is how I found out the
macros were working properly). Unfortunately, it calculates all
costs, regardless of type (including fixed costs, I believe), making
it impossible to how each of the cost categories contribute to the
total costs.

Just bought your book on Project Macros. new to the game.

Doug
 
R

Rod Gill

Enjoy the book. If you look at the macro in the book to produce a Margin
report, you see I apply one rate (A or B) to each assignment, let Project
calculate the cost then copy the result into a custom field. You can do
this, simply apply the relevant rate so Project calculates the cost you
need, copy the cost then restore the original cost rate table (A or B).

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx


----------------------------------------------------------------------------------------------------


You don't actually need a macro to do this. In the resource sheet,
double-click each resource and select the costs tab. Add a new rate valid
from the new year and another from the next year and so on. Project
calculates cost of all work using the rate for that period.

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx

---------------------------------------------------------------------------­-------------------------









- Show quoted text -

That is exactly what I have done, but the macro does not address the
resource rate as it changes from period to period. I use the macros
to identify what my labour costs are and what my material costs are
separately. There is only one field in Project that does that
calcuation and that is the cost field (which is how I found out the
macros were working properly). Unfortunately, it calculates all
costs, regardless of type (including fixed costs, I believe), making
it impossible to how each of the cost categories contribute to the
total costs.

Just bought your book on Project Macros. new to the game.

Doug
 

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