Find Number Of Mondays In given Period

kamlakar

New Member
Joined
Jun 17, 2005
Messages
23
hi everybody
find Number Of Mondays In Period

I need the number of Monday's that occur within an interval between two dates,
I use the following Array Formula:

=SUM(IF(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2,1,0))

This formula assumes the following:
A2 contains the beginning date of the interval
B2 contains the ending date of the interval
C2 contains the day-of-week number (1=Sunday)

but same one is not working in my spreadsheet.

can anybody guide me.? :(
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Kamlakar,

Would pushing your data through a pivot table give
you the results you reqiure ???.

So if 2 = Monday , use "count of 2" within your table.

Hope this helps

Russ.
 
Upvote 0
hi !

this is not pivot table data

even if i changed formula as per your suggestion
it wont worked.

please help me !

kamlakar
 
Upvote 0
What you posted is an array formula. After typing it you must press Ctrl+Shift+Enter, not just Enter. If correctly entered Excel will surround it with curly braces {}.
 
Upvote 0
Hi k,

Have you entered the array formula with the required CSE keystrokes?

CSE = Control+Shift+Enter

Chip's formula works OK when entered in that way.
 
Upvote 0
Maybe I'm missing somthing here???

But I don't think you need an array formula...

I'm also not clear about what is in C2, i.e. why it's relevant to the problem if it's always Mondays you're interested in?

Do you want to include the start and end dates, or just the dates between?

I haven't fully formulated this yet, but what I'm thinking is along the lines of;

=INT((B2-A2/)7) plus you might need to add 1 depending on the start day and the size of the remainder...

There's always a Monday in every 7 day period right?

Unless, as I say, I'm missing something??

Regards,

Simsy
 
Upvote 0
Thanks everybody

u have help me to solve my problem

really mr excel is great.

lot of thanks again !

kamlakar
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,375
Members
448,888
Latest member
Arle8907

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