Date Formula

jme1013

New Member
Joined
Aug 14, 2010
Messages
19
trying to write a formula that makes a cell display the 1st Wednesday of the current month. :confused:
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I suspect there are plenty of better alternatives but the below should return given date for a given year, month, day of week and instance
(ie 2nd Monday of Jan 2034)

=DATE($C$2,$D$2,1)+MOD($A$2-WEEKDAY(DATE($C$2,$D$2,1),2),7)+7*($B$2-1)
where C2 holds Year, D2 Month, A2 day of week (Mon = 1), B2 instance

modify as appropriate
(note pending instance the value returned may reside outside of the given month - eg 10th Tuesday etc...)
 
Upvote 0
I don't know if this is better, but this is what I came up with...

=DATE(YEAR(TODAY()),MONTH(TODAY()),8)
-CHOOSE(WEEKDAY(DATE(YEAR(TODAY()),MONTH(TODAY()),1),2),5,6,7,1,2,3,4)

This returns the date of the first Wednesday of the month based on today's date.
 
Upvote 0
trying to write a formula that makes a cell display the 1st Wednesday of the current month. :confused:

Specifically for that

=TODAY()-DAY(TODAY())+8-WEEKDAY(TODAY()-DAY(TODAY())+4)

or for a generic version with the setup that Donkeyote suggested try

=DATE(C2,D2,1+7*B2)-WEEKDAY(DATE(C2,D2,7-A2))
 
Upvote 0

Forum statistics

Threads
1,215,123
Messages
6,123,183
Members
449,090
Latest member
bes000

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