Count Number of Monday between two dates

Aswinraj

Board Regular
Joined
Dec 10, 2015
Messages
65
Hello,

I need to find Number of Mondays inside dates provided.

Start date: 4/20/2020 and End Date: 5/18/2020 = Result: 5 ( Including both Start and End dates since both are Mondays)
Start date: 5/25/2020 and End Date: 6/15/2020 = Result: 4 ( Including both Start and End dates since both are Mondays)

But i am not getting it correctly. I tried below formula..,

=ED-SD-NETWORKDAYS.INTL(SD,ED,12)+1
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Maybe,
=SUMPRODUCT((WEEKDAY((ROW(INDIRECT(StartDate&":"&EndDate)));2)=1)*1)
Book1
ABCDEFGHIJKL
1Start date: 4/20/2020 and End Date: 5/18/2020 = Result: 5 ( Including both Start and End dates since both are Mondays)
2Start date: 5/25/2020 and End Date: 6/15/2020 = Result: 4 ( Including both Start and End dates since both are Mondays)
3
4
520/apr18/mei5
625/mei15/jun4
7
Sheet1
Cell Formulas
RangeFormula
D5:D6D5=SUMPRODUCT((WEEKDAY((ROW(INDIRECT(B5&":"&C5))),2)=1)*1)
 
Upvote 0
But i am not getting it correctly. I tried below formula..,

=ED-SD-NETWORKDAYS.INTL(SD,ED,12)+1
That formula works for me for those dates. What start/end dates does it fail for?

BTW I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

20 04 21.xlsm
ABC
1StartEndMondays
220/04/202018/05/20205
325/05/202015/06/20204
Mondays
Cell Formulas
RangeFormula
C2:C3C2=B2-A2-NETWORKDAYS.INTL(A2,B2,12)+1
 
Upvote 0
@Peter_SSs Perfectly works as i wanted. Thank you so much.
No need to thank me as I didn't do anything - I just used your existing formula. :biggrin:
But I'm glad if it is working for you now.

(Don't forget to update your account details though.)
 
Upvote 0
T202004a.xlsm
ABCD
1StartEnd
220-Apr-2018-May-2055
325-May-2015-Jun-2044
4aa
Cell Formulas
RangeFormula
C2C2= SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(SD&":"&ED)))=2))
D2D2=NETWORKDAYS.INTL(SD,ED,"0111111")
C3C3= SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A3&":"&B3)))=2))
D3D3=NETWORKDAYS.INTL(A3,B3,"0111111")
 
Upvote 0

Forum statistics

Threads
1,215,545
Messages
6,125,455
Members
449,228
Latest member
moaz_cma

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