Choose function sequence

excellence

Board Regular
Joined
Oct 5, 2005
Messages
155
Office Version
  1. 365
Platform
  1. MacOS
In this formula for choosing a date for Memorial day, how is the sequence 30 thru 31 determined?
=DATE((A1),5,CHOOSE(WEEKDAY(DATE((A1),5,1)),30,29,28,27,26,25,31))

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I believe that it is looking at the Weekday that the month begins. For 2023, may 1 starts on Monday and in that formula it results as a 2, which then chooses 29 because that is the second in the series provided.

How it is determined from the weekday must be a logical calendar event.

Jeff
 
Upvote 0
The formula has the same result as your formula:

=WORKDAY.INTL(DATE(A1,6,1),-1,"0111111")

The result is the last Monday of May.
 
Upvote 0
Solution
The formula has the same result as your formula:

=WORKDAY.INTL(DATE(A1,6,1),-1,"0111111")

The result is the last Monday of May.
How does the formula "know", the -1 is a week and not a day to subtract?
 
Upvote 0
oops, I see that having zero ("as a workday") for monday and 1's for the rest would only include Mondays...is that right?
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,150
Members
453,021
Latest member
Justyna P

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