Output Nth occurrence of day i.e. "First Monday of the month" from a Date

mikechamberlain

New Member
Joined
May 30, 2013
Messages
3
Hi guys, this is my first post. I am in desperate need of an experts help please:

I have a list of dates in excel (i.e. 12/05/2012) and I want to populate a corresponding column with the Nth occurrence of whatever day it happens to be in that particular month (i.e. 12/05/2012 would output "2nd Saturday in month")

Alternatively I would be happy with 2 columns being populated, one with the occurrence (i.e. 2) and the other with the day (i.e. Saturday).


Thanks in advance!!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
=TEXT(A1,"dddd")
will give the day

=INT(DAY(A1)/7)+1
will give the ordinal number
 
Upvote 0
@Special-K99

If the month doesn't begin on a Monday your formula falls over, see below :-
Ordinals
A
B
C
1
12/05/2012
2nd Saturday
2
2
13/05/2012
2nd Sunday
2
3
14/05/2012
2nd Monday
3
4
15/05/2012
3rd Tuesday
3

<TBODY>
</TBODY>
Excel 2007

Worksheet Formulas
Cell
Formula
B1
=INT((DAY(A1)-DAY(EOMONTH(A1,-1)+1))/7)+1&CHOOSE(INT((DAY(A1)-DAY(EOMONTH(A1,-1)+1))/7)+1,"st ","nd ","rd ","th ","th ")& TEXT(A1,"dddd")
C1
=INT(DAY(A1)/7)+1
B2
=INT((DAY(A2)-DAY(EOMONTH(A2,-1)+1))/7)+1&CHOOSE(INT((DAY(A2)-DAY(EOMONTH(A2,-1)+1))/7)+1,"st ","nd ","rd ","th ","th ")& TEXT(A2,"dddd")
C2
=INT(DAY(A2)/7)+1
B3
=INT((DAY(A3)-DAY(EOMONTH(A3,-1)+1))/7)+1&CHOOSE(INT((DAY(A3)-DAY(EOMONTH(A3,-1)+1))/7)+1,"st ","nd ","rd ","th ","th ")& TEXT(A3,"dddd")
C3
=INT(DAY(A3)/7)+1
B4
=INT((DAY(A4)-DAY(EOMONTH(A4,-1)+1))/7)+1&CHOOSE(INT((DAY(A4)-DAY(EOMONTH(A4,-1)+1))/7)+1,"st ","nd ","rd ","th ","th ")& TEXT(A4,"dddd")
C4
=INT(DAY(A4)/7)+1

<TBODY>
</TBODY>


<TBODY>
</TBODY>

hth
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,173
Members
449,368
Latest member
JayHo

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