Find Saturdays that are within a set of dates

IIII

New Member
Joined
Jan 26, 2021
Messages
18
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hi All,

I currently have a function that identifies which dates between two dates are Saturdays. What I also need to know though, is how to work out if any of those Saturdays appear in a list of specified dates e.g. Leave//Holidays list of dates.

So the below example shows what I'm trying to get -- if any Saturdays between the two dates appear on the Leave//Holiday list, they are not counted as Saturdays as they are counted in the Leave//Holiday column instead.

Start DateEnd Date# of Saturdays# of Leave//HolidaysLeave//Holiday List
Friday, 1 December 2023Friday, 15 December 202320Saturday, 23 December 2023
Wednesday, 20 December 2023Tuesday, 26 December 202304Sunday, 24 December 2023
Saturday, 23 December 2023Monday, 25 December 202303Monday, 25 December 2023
Friday, 22 December 2023Tuesday, 2 January 202415Tuesday, 26 December 2023
Monday, 1 January 2024


I hope this makes sense.

If further clarification is required, please let me know.

Cheers.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try this

Book1
ABCDEFG
1Start DateEnd Date# of Saturdays# of Leave//HolidaysLeave//Holiday List
2Friday, 1 December 2023Friday, 15 December 202320Saturday, 23 December 2023
3Wednesday, 20 December 2023Tuesday, 26 December 202304Sunday, 24 December 2023
4Saturday, 23 December 2023Monday, 25 December 202303Monday, 25 December 2023
5Friday, 22 December 2023Tuesday, 2 January 202415Tuesday, 26 December 2023
6Monday, 1 January 2024
Sheet1
Cell Formulas
RangeFormula
D2:D5D2=NETWORKDAYS.INTL(A2,B2,"1111101",$G$2:$G$6)
E2:E5E2=SUMPRODUCT(($G$2:$G$6>=A2)*($G$2:$G$6<=B2))
 
Upvote 0
Solution
Try this

Book1
ABCDEFG
1Start DateEnd Date# of Saturdays# of Leave//HolidaysLeave//Holiday List
2Friday, 1 December 2023Friday, 15 December 202320Saturday, 23 December 2023
3Wednesday, 20 December 2023Tuesday, 26 December 202304Sunday, 24 December 2023
4Saturday, 23 December 2023Monday, 25 December 202303Monday, 25 December 2023
5Friday, 22 December 2023Tuesday, 2 January 202415Tuesday, 26 December 2023
6Monday, 1 January 2024
Sheet1
Cell Formulas
RangeFormula
D2:D5D2=NETWORKDAYS.INTL(A2,B2,"1111101",$G$2:$G$6)
E2:E5E2=SUMPRODUCT(($G$2:$G$6>=A2)*($G$2:$G$6<=B2))

Perfect! Thanks, @Phuoc - appreciate your help!
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,082
Members
453,021
Latest member
Justyna P

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