|A process, not a solution:|
1 - Determine the number of months between the Project Start Date and the employee's next anniversary date.
There are multiple ways to do this, starting with this info:
and moving on to a Google search where you'll find DATEDIF methods as well as many others.
The salary during this period will be the employee's current salary.
2 - Determine the number (A) of anniversay dates that the project will span. Use A - 1 to determine how many 4% increases the employee will get that will cover a full 12 months.
3 - Determine the number of months between the Project End Date and the previous anniversary date. The salary during this period will be 4% more than the last full year's salary.
4 - Now ask yourself: "What do I mean by average monthly salary?" Do I mean the highest salary attained averaged over the entire project? Do I mean the average of the ending salary and the beginning salary? Do I mean the sum of the total salary for each time period, based on the number of months at that specific salary, averaged over the entire project?
Each of those "averages" is going to give you a different answer, so you need to know what you are looking for before you start constructing formulae.