Finding First X Weekday of the Year (I Know Formula, but can't adapt)

ClwnMan76

New Member
Joined
Oct 26, 2009
Messages
28
Office Version
  1. 365
Platform
  1. Windows
I found the right formula I need on a site (that didn't explain it :crash:). Between this and other examples, I can't piece enough together to wrap my head around it. Two hours of googling and I'm done!

This gives me the first Monday (obviously you probably already know that) and I'm wanting to adapt it to Thursday. I understand the Date part. I get the rest, but really how they work together. If someone has time to explain that would be AWESOME! If not, a simple modification on how to adapt to to be Thursday instead would be appreciated!! BTW.... B2 has a year in it (2019).



=DATE(B2,1,1)+CHOOSE(WEEKDAY(DATE(B2,1,1),2),0,6,5,4,3,2,1)
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try
=DATE(B2,1,1)+CHOOSE(WEEKDAY(DATE(B2,1,1),2),3,2,1,0,6,5,4)

DATE(B2,1,1) returns 1/1/2019
which gives
WEEKDAY(1/1/2019,2) which will give the day of the week based on Monday being 1, Tuesday 2 etc in this case 2
which then gives
CHOOSE(2,3,2,1,0,6,5,4) which will then choose the 2nd value from the numbers in blue in this case 2
which will then be added to date to give 3/1/2019
 
Upvote 0
Cross posted https://www.excelforum.com/excel-fo...f-the-year-i-know-formula-but-cant-adapt.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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