Return nth day of the month

djxela

New Member
Joined
Sep 22, 2011
Messages
6
I need a formula that will read a date and return the nth day of that month. For example 01/02/2019 = 1st Friday
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try: =DAY(A1)&MID("thstndrdth",MIN(9,2*RIGHT(DAY(A1))*(MOD(DAY(A1)-11,100)>2)+1),2)&TEXT(A1, " dddd")
 
Upvote 0
Or (I dont like this now Ive seen Macropod's much shorter formula!)

=QUOTIENT(A1-DATEVALUE("01/"&TEXT(A1,"mm/yyyy")),7)+1&LOOKUP(QUOTIENT(A1-DATEVALUE("01/"&TEXT(A1,"mm/yyyy")),7)+1,{1,2,3,4,5},{"st","nd","rd","th","th"})&TEXT(A1," dddd")
 
Upvote 0
Or (I dont like this now Ive seen Macropod's much shorter formula!)

=QUOTIENT(A1-DATEVALUE("01/"&TEXT(A1,"mm/yyyy")),7)+1&LOOKUP(QUOTIENT(A1-DATEVALUE("01/"&TEXT(A1,"mm/yyyy")),7)+1,{1,2,3,4,5},{"st","nd","rd","th","th"})&TEXT(A1," dddd")

DATEVALUE is not necessary in your fomula.

=QUOTIENT(A1-("01/"&TEXT(A1,"mm/yyyy")),7)+1&LOOKUP(QUOTIENT(A1-("01/"&TEXT(A1,"mm/yyyy")),7)+1,{1,2,3,4,5},{"st","nd","rd","th","th"})&TEXT(A1," dddd")
 
Upvote 0
Hi Macropod

Thank you for prompt assistance.
I think i might have been misunderstood. What i wanted the result to be is if that specific date is the 1st Friday, 2nd Friday, 4th Friday, or 1st Monday, 2nd Monday, 3rd Monday or 4th Monday of the month
Something line the below

01/01/181st Monday
02/01/181st Tuesday
03/01/181st Wednesday
04/01/181st Thursday
05/01/181st Friday
06/01/181st Saturday
07/01/181st Sunday
08/01/182nd Monday
09/01/182nd Tuesday
10/01/182nd Wednesday
11/01/182nd Thursday
12/01/182nd Friday
13/01/182nd Saturday
14/01/182nd Sunday
15/01/183rd Monday
16/01/183rd Tuesday
17/01/183rd Wednesday
18/01/183rd Thursday
19/01/183rd Friday
20/01/183rd Saturday
21/01/183rd Sunday
22/01/184th Monday
23/01/184th Tuesday
24/01/184th Wednesday
25/01/184th Thursday
26/01/184th Friday
27/01/184th Saturday
28/01/184th Sunday
29/01/185th Monday
30/01/185th Tuesday
31/01/185th Wednesday

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
See if the following formula works for you:

=CHOOSE(QUOTIENT(A1-EOMONTH(A1,-1)-1,7)+1,"1st","2nd","3rd","4th","5th")&TEXT(A1," dddd")
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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