Formula to calculate how many weekend days

treeppm

Board Regular
Joined
Jun 3, 2015
Messages
60
Anyone can guide me how to count total week end days between selected dates?.
in the following what formula we have to write to in B5 to get result like that
[TABLE="class: cms_table_grid"]
<tbody>[TR]
[TD]2019/06/05
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2019/06/07[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2019/06/10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2019/06/13[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]weekend days
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]


Kind Regards
 

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.
Hi you use this =SUM(INT((WEEKDAY(B1-{1,7})+B2-B1)/7))

B1 and B3 is start date
B2 and B4 end date

example below:

Start date 05-06-2019 =SUM(INT((WEEKDAY(B1-{1,7})+B2-B1)/7))
end date 07-06-2019
Start date 10-06-2019 =SUM(INT((WEEKDAY(B3-{1,7})+B4-B3)/7))
end date 13-06-2019
Total weekends 0
 
Upvote 0
Kindly note. You should not touch anything from B1 to B4 values. it has other things.
I don't know am I making clear question or not. Please note it

from 2019/06/05 to 2019/06/17 it has 4 days ( 2 saturday and 2 sundays)

If the range is 2019/06/05-2019/06/17 it should give result 4
that's what I want.

Kind Regards
 
Upvote 0
Hi you use this =SUM(INT((WEEKDAY(B1-{1,7})+B2-B1)/7))

B1 and B3 is start date
B2 and B4 end date

example below:

Start date 05-06-2019 =SUM(INT((WEEKDAY(B1-{1,7})+B2-B1)/7))
end date 07-06-2019
Start date 10-06-2019 =SUM(INT((WEEKDAY(B3-{1,7})+B4-B3)/7))
end date 13-06-2019
Total weekends 0

You just copied the formula from extended office webpage?.
 
Upvote 0
Maybe something like this.
In the formula A1 is the start date and A4 is the end date.
Excel Workbook
AB
16/5/2019
26/7/2019
36/10/2019
46/13/2019
52
Sheet
 
Upvote 0
Sorry for posted in two threads, I thought it's different question that's why most of the persons didn't answer in that thread. here after will strictly follow the rules and guides.


@AhoyNC
Thank you for your guidance bro. working perfecfet
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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