Finding weekends and holidays within a date range

ColinPearsonEIT

New Member
Joined
Jan 15, 2024
Messages
8
Office Version
  1. 2021
Platform
  1. Windows
Hey Folks!
So I've made this sheet that looks at a user-entered date range, and depending on the user-selected work schedule, it finds the number of days worked, the number of Saturdays worked, the number of Sundays worked, and the number of straight-time/over-time/double-time hours worked. And it works! I used a little help online and I honestly cant quite recall how everything works exactly. I have a couple questions:
1) In cell Q10, I have this formula "=IF(ISBLANK(C10),0,SUM(INT((WEEKDAY(C10-7)+D10-C10)/7))*LEFT(RIGHT(L10,2),1))" ... I have been looking at it, and I think the SUM() is completely unnecessary. Would y'all agree?
2) I know how to take holidays out of column M which counts up the number of workdays. That part is pretty self-explanatory. What I don't know how to do is to take the holidays out of the count of number of Saturdays and/or Sundays worked in columns Q and R, respectively. Since the number of over-time hours in column O (any hours worked past 8 in one day and all hours on Sat) and double-time hours in column P (all hours on Sun) is based on the count of Sat/Sun worked, those totals will also also be off since they currently do not exclude holidays that fall on weekends.

New to the forum so I understand if this is a big ask. I've used it a lot over the years but not posted until now. Thanks for your help smart folks of the internet!

I'm also not able to install the plugin to upload a mini-sheet, can I upload the whole file somehow? Sorry, I'm not seeing an option to do that.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Since I couldn't upload the file yet, I should point out that cells C10 and D10 in the formula are user-entered dates.
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,153
Members
452,615
Latest member
bogeys2birdies

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