Forum Discussion
MarkBeck54
Mar 17, 2026Copper Contributor
Mark
Hi trying to find last wednesday of month where thursday is not new month
4 Replies
- IlirUIron Contributor
Use below formula.
=LET( y, 2026, mth, 9, dt, DATE(y, mth, 1), d, DATE(y, mth, SEQUENCE(EOMONTH(dt, 0) - dt + 1)), wd, WEEKDAY(d, 2), wed, TOCOL(d / (wd = 3), 3), thu, TOCOL(d / (wd = 4), 3), IF(WEEKNUM(MAX(TOCOL(d / (wd = 3), 3)), 2) = WEEKNUM(MAX(TOCOL(d / (wd = 4), 3)), 2), MAX(wed), MAX(DROP(wed, -1))) )Change the year and month in formula as per you need.
Hope this helps.
IlirU
- m_tarlerBronze Contributor
Alternatively:
=EOMONTH(A1,0) - WEEKDAY(EOMONTH(A1,0),14)Here are the 3 options tested on April and Sept of 2026 where the last day of the month is on a Thurs and a Wed respectively:
- Olufemi7Iron Contributor
Hello MarkBeck54,
Use the formula =EOMONTH(A1,0) - WEEKDAY(EOMONTH(A1,0)-3,1) where A1 contains any date in the month. This returns the last Wednesday whose following Thursday is still in the same month.- MarkBeck54Copper Contributor
Thank you works a treat