• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Calculate Working Days Between Two Dates

Excellerator365

New Member
Hi,

For payroll purposes I need to be able to calculate the amount of days between two dates, but within a given payroll period.
Any help is greatly apprechiated.

81677
 
hello .. You can Use This,BUT I Want From You To Change Forum Title to
Calculate Working Days Between Two Dates
Code:
=DATEDIF($B7,$C7,"D")-DATEDIF(E$2,E$3,"D")
 

Attachments

  • Payroll case1.xlsx
    10 KB · Views: 6
Last edited:
Hi, Thank you.

This however suggests that in the period 1-31 january, the gentleman has worked for 60+ days.
The maximum number of days is 31 for january.
 
E7:
Code:
=MAX(0,MIN(E$3,$C7)-MAX($B7,E$2)+1)
copied down and across, will give you the count of days between two dates as you asked.
You can have working days count if you want; this assuming Sat and Sun are weekends:
Code:
=MAX(0,NETWORKDAYS.INTL(MAX($B7,E$2),MIN(E$3,$C7)))
NETWORKDAYS.INTL can also include a list of holiday dates to exclude and can define any combination of days of the week that are to be counted as working days.
 
Last edited:
Back
Top