Formula for unpaid leave adjustment

MamoCTSA

New Member
Joined
Oct 2, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone

I am a beginner in excel. Here are my two questions:

1. How do I calculate the exact number of days in a month in excel? Days gives me the days between the first & last day of the month, so I manually adjusted for the short 1 day.

2. I need a formula that calculates the leave adjustment required when employees take unpaid leave.

i.e if Steven took unpaid leave in March, the formula needs to recognise that March has 31 days of which Steven took 8 (working days) as unpaid leave and therefore we need to adjust his March accrual of 1.69 with 8 / 31 * 1.69

How do I do this?
I need the formula to be able to span over months (e.g if unpaid leave is in March & April, the formula needs to recognise and calculate accordingly based on each months’ days & accrual.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Welcome to the Board!

Note that you cannot upload files to this site. However, MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

To answer your first question, if you have a valid date in cell A1, you can get the number of days in that month with this formula:
Excel Formula:
=DAY(EOMONTH(A1,0))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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