I currently have a formula below that works for calculating the monthly salary based on start and end date. Here it is....
IF(OR($B2>EOMONTH(E$1,0),$C2<E$1),"",$D2*(MIN(EOMONTH(E$1,0),$C2)-MAX(E$1,$B2)+1)/IF(MOD(YEAR($E$1),4)=0,366,365))
This calculates the monthly salary based on the number of days in the month compared to the annual salary. As a result, each monthly salary is different based on the number of days.
I would like to change this formula so that the monthly salary is the same each month except for partial months (either the start date month or the end date month). In this case, the prorated salary for the month that has a partial date should calculate based on the # of days in month as a % of total days in that month.
For example, a person with annual salary of $120,000 has a monthly salary of $10,000. If the person is starting on May 15, 2024, the salary cost for the month of May is $5,484. From May 15th through May 31st is 17 days, so the cost is equal to 17*(10,000/31). I would then want to see a monthly salary cost of $10,000 from June onwards until the person leaves. The month they leave would be prorated similarly.
Can anyone help with this update to the above formula? Thanks!
Bookmarks