VBA code for getting the third monday for each month

Archies

Board Regular
Joined
Aug 12, 2012
Messages
55
Hi,I want to write a VBA code that will find the third monday every month and will add one sheet in my excel.I have a code that adds a sheet to excel but not able to apply the logic of third monday.For eg: if i run my macro on 20th august. i will check if its 3rd monday and will add one excel sheet with the name as "August 20 2012".Please let me know how this can be achieved.Thanks!Archie
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
See my mini-blog article here..

Nth Such-And-Such Day Of The Month

for both a generalized formula and function which can be called from other VB code or used as a UDF (user defined function) that allows you to calculate what you asked specifically for and more.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,412
Messages
6,124,761
Members
449,187
Latest member
hermansoa

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