# MS Project - Multi-year Inflation

I am managing a 3 year project in a country where the average annual inflation rate is 12%. Instead of going through every item and entering "+12%" into the cost rate table for each item, is there a way the rate increasing automatically for all resources over the 3 years in MS Project Professional 2016?

The simplest and most repeatable way to do this is with a macro/vba procedure. Here's some code that John - Project created and shared on msdn some years ago (VBA Macro Help - Cost Rate Tables).

Option Compare Text

Sub NOVA_Rates()

Dim r As Resource

For Each r In ActiveProject.Resources

``````'jump around blank lines on Resource Sheet

If Not r Is Nothing Then

'only do this if resource is labor type

If r.Type = pjResourceTypeWork Then

'first clear all pay rate data

'Note: this is necessary if the macro is run a 2nd time with

'the same data. Additional code is necessary to add new data

'to existing pay rate tables and clearing may not be necessary.

For i = 1 To 5

'cycle through each of the 5 rate tables

Set pr = r.CostRateTables(i).PayRates

pr(1).StandardRate = 0

pr(1).OvertimeRate = 0

pr(1).CostPerUse = 0

'clearing must be done in reverse order

If pr.Count > 1 Then

For j = pr.Count To 2 Step -1

pr(j).Delete

Next j

End If

Next i

'set new object for "B" table only

Set pr = r.CostRateTables("B").PayRates

'add new rate data based on Resource Text1 field

If InStr(1, r.Text1, "Proj") > 0 Then

pr.Add "7/2/2011", "\$1/h", "\$5/h", "\$0"

ElseIf InStr(1, r.Text1, "elec") > 0 Then

pr.Add "7/2/2011", "\$2/h", "\$6/h", "\$0"

ElseIf InStr(1, r.Text1, "mech") > 0 Then

pr.Add "7/2/2011", "\$3/h", "\$7/h", "\$0"

End If

End If

End If
``````

Next r

End Sub

• Everything below the hyperlink belongs together in a single module in project vba. I don't know how to control that here. – Tom Boyle Oct 10 '18 at 15:17