Next 1st or 3rd Thursday, whichever comes first from a given date

davidcom

New Member
Joined
Apr 25, 2024
Messages
5
Office Version
  1. 365
Hi all. Could someone please help me with a formula that will give me the next 1st or 3rd Thursday, whichever comes first, from a given date.

So for example if A1 = 4/2/24, the formula will return 4/4/24 (which is the earlier of the next 1st or 3rd Thursday)

If A1 = 4/11/24, the formula will return 4/18/24 (which is the 3rd Thursday of April, so the earlier of the next 1st or 3rd Thursday from 4/11/24)

And if A1 = 4/18/24, the formula would return 5/2/24 (which is the 1st Thursday of May, so the earlier of the next 1st or 3rd Thursday from 4/18/24)

Hopefully that makes sense!!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try:
Excel Formula:
=LET(t,A1 + (5 - WEEKDAY(A1, 2) + IF(WEEKDAY(A1, 2) > 5, 7, 0))-1,IF(A1<t,t,t+14))
 
Upvote 0
Thanks @Cubist . Unfortunately, that formula didn't work. When I entered 4/11/2024 into A1, the result should be 4/18/24 (which is the 3rd Thursday of April, so the earlier of the next 1st or 3rd Thursday from 4/11/24). But your formula returned 4/25/24 (the 4th Thursday of April)
 
Upvote 0
Book1
AB
14/2/244/4/24
24/11/244/18/24
34/18/245/2/24
Sheet1
Cell Formulas
RangeFormula
B1:B3B1=LET(t,DATE(YEAR(A1),MONTH(A1),1+MOD(11-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1)),7))+1,IF(A1<t,t,IF(A1<t+14,t+14,t+28)))
 
Upvote 0
See if the following formula works for you:
Excel Formula:
=LET(a,TOROW(WORKDAY.INTL(EOMONTH(A1,{-1;0}),{1,3},"1110111")),XLOOKUP(A1+1,a,a,,1))
 
Upvote 1
Solution
Book1
AB
102-Apr04-Apr
211-Apr18-Apr
319-Apr02-May
401-May02-May
Sheet1
Cell Formulas
RangeFormula
B1:B4B1=DATE(YEAR(A1),MONTH(A1),IF(DAY(A1)<=1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),4,3,2,1,0,6,5),1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),4,3,2,1,0,6,5),IF(DAY(A1)<=1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),4,3,2,1,0,6,5)+14,1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),4,3,2,1,0,6,5)+14,DAY(EOMONTH(A1,0))+1+CHOOSE(WEEKDAY(EOMONTH(A1,0)+1),4,3,2,1,0,6,5))))
A4A4=EOMONTH(A3,0)+1
 
Upvote 0
With Workday

Book1
AB
102-Apr04-Apr
211-Apr18-Apr
319-Apr02-May
401-May02-May
Sheet1
Cell Formulas
RangeFormula
B1:B4B1=IF(A1<=WORKDAY.INTL(A1-DAY(A1)+1,1,"1110111"),WORKDAY.INTL(A1-DAY(A1)+1,1,"1110111"),IF(A1<=WORKDAY.INTL(A1-DAY(A1)+1,3,"1110111"),WORKDAY.INTL(A1-DAY(A1)+1,3,"1110111"),WORKDAY.INTL(EOMONTH(A1,0)+1,1,"1110111")))
 
Upvote 0
@davidcom: Please note that the formulas from Post #4 and Post #5 will return different results for 5/17/24.
Post #4: 5/30/24 (5th Thursday of May)
Post #5: 6/6/24 (1st Thursday of June)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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