Count of Weeks

dhayes1963

New Member
Joined
Oct 31, 2002
Messages
15
Can anyone advise how I could make a cell display the number of Mondays that have occurred during a specified date period ? I specifically want my worksheet to display a count of weeks (Mondays) between (and including) 01-Jul-2002 and (including) the current date. Thanks.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
try this:

=INT((TODAY()-"01/07/2002")/7)+IF(WEEKDAY("01/07/2002"+3)+MOD(TODAY()-"01/07/2002",7)>=7,1)


paddy
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi dhayes1963:

Try the following ...

'=INT((B2-A2)/7)+OR(AND(WEEKDAY(A2)<=C2,WEEKDAY(B2)>=C2),AND(WEEKDAY(B2)>=C2,WEEKDAY(A2)<=C2))*1


where A2 houses the starting date, B2 houses the ending date, and C2 houses the weekday number -- in your case 2 for Monday

Regards!
Yogi Anand
 
L

Legacy 11779

Guest

ADVERTISEMENT

Since it is known that 1 Jul 2002 is a monday, the formula could be reduced to :-

=INT((TODAY()-"1/7/2002")/7)+1

This counts the number of Mondays.

However, if you just want the number of complete weeks starting from 1 Jul 2002 :-

=INT((TODAY()-"30/6/2002")/7)
This message was edited by Pear on 2002-11-02 09:40
 

mneff

New Member
Joined
Oct 24, 2008
Messages
1
Re: Count of # of Partial Weeks

I would like to count the number of weeks...including partial weeks? Does such a formula exist?
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Hello mneff,

Welcome to MrExcel

You'd be more likely to get some helpful answers by starting a new thread (some users disregard threads with several answers), and you might want to give a few more details of what you want to do.

I'll have a guess....

If you have two dates, one in A2 and a later one in B2 then to find the number of weeks between them, rounded up so that a partial week is counted as a full one

=INT((B2-A2+6)/7)

or if you want to get a result like "4 weeks 3 days" try

=INT((B2-A2)/7)&" days "&MOD(B2-A2,7)&" days"
 

Forum statistics

Threads
1,144,741
Messages
5,726,014
Members
422,653
Latest member
mntsiki

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
Top