Finding the first (n) Monday of every third (or every) month

chuckf201

New Member
Joined
Nov 28, 2011
Messages
28
I've been using this formula for a few weeks and I discovered an error in the calculations but don't know why.
Code:
=LOOKUP(G2,DATE(YEAR(G2),{0,3,6,9,12;3,6,9,12,15},8)-WEEKDAY(DATE(YEAR(G2),{0,3,6,9,12;3,6,9,12,15},1)))
G2=3/1/2022
The weekday 1 should equal the first Monday of the month (3/7/2022) but it returns (Saturday) 3/5/2022.
What am I doing wrong.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
try the following
T202209a.xlsm
GH
1
2Tue 01-Mar-22Mon 07-Mar-22
3
8c
Cell Formulas
RangeFormula
H2H2=WORKDAY.INTL(G2-1,1,"0111111")
 
Upvote 0
I have not tested the formula that you posted.
You can review the results using your data with Excel's Formulas Evaluate Formula

Is your formula missing a parameter? I inserted a 3 near the very end of the formula.

T202209a.xlsm
GH
2Tue 01-Mar-22Mon 07-Mar-22
3
4Tue 01-Mar-22Mon 07-Mar-22
8c
Cell Formulas
RangeFormula
H2H2=WORKDAY.INTL(G2-1,1,"0111111")
H4H4=LOOKUP(G4,DATE(YEAR(G4),{0,3,6,9,12;3,6,9,12,15},8)-WEEKDAY(DATE(YEAR(G4),{0,3,6,9,12;3,6,9,12,15},1),3))
 
Last edited:
Upvote 0
The 3 in cell H4 denotes = Monday (0) thru Sunday(6)
I am using the default of Sunday(1) thru Saturday(7). Omitting this parameter defaults to #1. I have other entries that work fine. This only one does not.

Your formula in H2 works as for all months however, I have meeting that are every other month, once per year, quarterly, etc and I want a formula that accounts for these variations as well.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

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