Payroll budget

Sanjy2805

New Member
Joined
Nov 15, 2016
Messages
1
Hi,

I am trying to create a payroll budget spreadsheet.

I have the following data

A,B,C
Employee Start Date, Employee End Date, Gross Salary

I want to then put in a monthly budget in month cells which are labeled November 2016, December 2016, January 2017 etc...

So for instance if I have an employee who had a start date on the 5/11/2016 and ended on the 29 December 2016, they should be paid the rest of the days in November and the 29 days in December. Each employee has different start dates and end dates.

Any help appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hello Sanjy,

I don't know if i understand your actual question. Maybe this can help you a little.

Start dateEnd dateGross SalarySalary
1-1-20151-4-2015300007397,26

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

formula i used:
=C2*(Datedif(A2;B2;"d")/365)

Hope it helps a little.
 
Upvote 0
Hi Sanjy,

Not sure if MrJoosten has answered all of your request. It would seem to me that you wanted each month populated with the salary earned during that month. Each month header is the first of the given month. My data is set as follows

Start date End date Gross Jan Feb etc.

All pertinent values begin on row 2

So cell E1 has 01/01/2016 and in cell E2 would go the following formula

Code:
=IF(AND(MONTH(E$1)>=MONTH($B$2),MONTH(E$1)<=MONTH($C$2)),IF(MONTH($B$2)=MONTH(E$1),SUM(DATEDIF($B$2,EOMONTH($B$2,0),"d")*SUM($D$2/365)),IF(MONTH($C$2)=MONTH(E$1),SUM(SUM(DAY(DATE(YEAR(E$1),MONTH(E$1)+1,))-DATEDIF($C$2,EOMONTH($C$2,0),"d"))*SUM($D$2/365)),IF(AND(MONTH(E$1)>MONTH($B$2),MONTH(E$1)<MONTH($C$2)),SUM(DAY(DATE(YEAR(E1),MONTH(E1)+1,))*SUM($D$2/365))))),0)

(going to need to use the scroll bars to get the whole formula)


The first IF(AND checks to see if the current month (cell E1) is greater than or equal to your start date AND less than or equal to your end date.

It then checks to see if the current month (cell E1) is equal to the month of your start date

if so it then takes the number of days worked in that month and multiplies it against the gross salary divide by 365.

IF the above is not true it checks to see if the current month (cell E1) is equal to the month of your end date.

if so it then takes the number of days worked in that month and multiplies it against the gross salary divide by 365.

IF the above is not true it checks to see if the current month (cell E1) is greater than the month of your start date AND less than the month of your end date.

if so it multiplies the total number of days in the current month by the gross salary divided by 365.

IF the first IF(AND is not true then it returns a 0.

I am sure one of the formula gurus on here can do all this with a much simpler formula.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,003
Members
449,203
Latest member
Daymo66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top