Hi,
Besides using workaround DAYS() - NETWORKDAYS(),
Is there any build-in function to count weekend days between 2 dates.
Hi,
Besides using workaround DAYS() - NETWORKDAYS(),
Is there any build-in function to count weekend days between 2 dates.
1. Thank those who have helped you by clicking the Star * below the post.
2. Please mark your post [SOLVED] if it has been answered satisfactorily.
Sincerely,
Farid
Possible with using sumproduct and weekday()?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hi FDibbins,
WEEDAY() will return 1 to 7 (Sunday to Saturday). It is really nonsense to count number of days in weekend between 2 dates.
Try:
Formula:Please Login or Register to view this content.
where B2 is your start date and C2 is your end date. The "1111100" part indicates which days to include/exclude, i.e. 1 = exclude, 0 = include.
Here are 2 ways...
A1 = start date
B1 = end date
To count the Saturday and Sunday dates within the date range of A1:B1...
=SUM(INT((WEEKDAY(A1-{6,7},2)+B1-A1)/7))
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)>=6))
Last edited by Tony Valko; 09-30-2015 at 05:38 AM.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Hi mattsmith,
Thanks a lot. welcome to forum
@ Tony,
Tq for another alternative method.
You're welcome!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks