UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Macro That Will Calculate The Nth Wednesday Of Each Month., Any Version    
 
   
billwild
post Feb 26 2020, 02:37 PM
Post#1



Posts: 126
Joined: 4-June 02



I have the date 02/26/2020 in A1 . I need to populate the next 12 columns to show dates that represent the 4th Wednesday of each following months (2/26/2020, 3/25/2020,,4/22/2020, 5/27/2020, etc.)

--------------------
always learning....<img src="/forums/images/graemlins/laugh.gif" alt="" />
Go to the top of the page
 
cheekybuddha
post Feb 26 2020, 03:25 PM
Post#2


UtterAccess Moderator
Posts: 12,620
Joined: 6-December 03
From: Telegraph Hill


What have you tried?

--------------------


Regards,

David Marten
Go to the top of the page
 
RJD
post Feb 26 2020, 03:34 PM
Post#3


UtterAccess VIP
Posts: 10,336
Joined: 25-October 10
From: Gulf South USA


Hi:

Looking at the solution HERE and fitting that to your requirement ...

=DATE(YEAR($A$1),MONTH($A$1)+1,29)-WEEKDAY(DATE(YEAR($A$1),MONTH($A$1)+1,4))

... is the March date for the 4th Wednesday.

Incrementing the month+ component gets you the next month. See the demo attached. It goes for a few months, and you can expand that as you wish, or re-figure how you want to come up with the month+ figure.

HTH
Joe
Attached File(s)
Attached File  IncrementDate.zip ( 12.67K )Number of downloads: 2
 

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
RJD
post Feb 26 2020, 03:52 PM
Post#4


UtterAccess VIP
Posts: 10,336
Joined: 25-October 10
From: Gulf South USA


Hi: Thinking of an easier alternative to changing the month+ in every column, you could put ...

=DATE(YEAR(A$1),MONTH(A$1)+1,29)-WEEKDAY(DATE(YEAR(A$1),MONTH(A$1)+1,4))

... in cell B1 and drag/copy it to the right as far as you wish. That way the column identifier will automatically increment and you will not have to deal with the month+ manual changes...

HTH
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
billwild
post Feb 26 2020, 04:21 PM
Post#5



Posts: 126
Joined: 4-June 02



PERFECT!!!!!!! THANK YOU VERY, VERY MUCH!

--------------------
always learning....<img src="/forums/images/graemlins/laugh.gif" alt="" />
Go to the top of the page
 
RJD
post Feb 26 2020, 05:33 PM
Post#6


UtterAccess VIP
Posts: 10,336
Joined: 25-October 10
From: Gulf South USA


You are very welcome. And thanks to "Biff" and the ref post from 2010 for pointing us both in the right direction.

Regards,
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    3rd April 2020 - 03:08 AM