+ Reply to Thread
Results 1 to 8 of 8

2nd Tuesday of the month

  1. #1
    Registered User
    Join Date
    12-05-2018
    Location
    Gloucester, UK
    MS-Off Ver
    2013
    Posts
    4

    2nd Tuesday of the month

    Hi

    I wonder if anyone can help me. I am using the following formula to calculate the second Tuesday of the month

    =DATE(YEAR(A5),MONTH(A5)+1,14)-WEEKDAY(DATE(YEAR(A5),MONTH(A5)+1,4))

    What I am finding is that for May 2019 it is only giving me the first Tuesday of the month.

    Why would this be. It seems to be correct for every other month for 2019.

    Please Help

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,222

    Re: 2nd Tuesday of the month

    Another way:

    =WORKDAY.INTL(EOMONTH(A5,0),2,"1011111")

  3. #3
    Registered User
    Join Date
    12-05-2018
    Location
    Gloucester, UK
    MS-Off Ver
    2013
    Posts
    4

    Re: 2nd Tuesday of the month

    Thank you Phuocam. That works perfectly.

    Can a similar thing be used for the last Thursday of the month.

    Is there anywhere I can find further info on this?

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,223

    Re: 2nd Tuesday of the month

    Please try

    Phuocam's Formula
    =WORKDAY.INTL(EOMONTH(A5,0),-1,"1110111")

    or

    =EOMONTH(A5,0)-WEEKDAY(EOMONTH(A5,0),15)+0


    Change 0 for change month

    -1: -1 for last 1,2,3 for 1st 2nd 3rd …
    +0: 0 for last 7,14,21 for 1st 2nd 3rd …

    "1110111": Mon,Tue,Wed,...,Sun Put 0 on weekday that you want
    15: 11,12,13,…, for Sun,Mon,Tue,Wed,...

  5. #5
    Registered User
    Join Date
    12-05-2018
    Location
    Gloucester, UK
    MS-Off Ver
    2013
    Posts
    4

    Re: 2nd Tuesday of the month

    Thank you Bo_Ry that is really useful and clear

  6. #6
    Registered User
    Join Date
    12-05-2018
    Location
    Gloucester, UK
    MS-Off Ver
    2013
    Posts
    4

    Re: 2nd Tuesday of the month

    Ah I have just realised if the last Thursday of the month is the last day of the month it gives the previous week date.

    for example Thu 28 Feb actually returns the result of Thu 21 Feb

    Any ideas

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,223

    Re: 2nd Tuesday of the month

    Please try

    =EOMONTH($A5,0)-MOD(WEEKDAY(EOMONTH($A5,0),15),7)
    Last edited by Bo_Ry; 12-06-2018 at 07:14 AM. Reason: Typo 14 to 15

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,222

    Re: 2nd Tuesday of the month

    Quote Originally Posted by morglijay View Post
    for example Thu 28 Feb actually returns the result of Thu 21 Feb
    Adjust a little:

    =WORKDAY.INTL(EOMONTH(A5,0)+1,-1,"1110111")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 07-14-2024, 12:00 PM
  2. Calculating The Last Tuesday Of Every Month
    By lauzhang in forum Excel General
    Replies: 5
    Last Post: 08-22-2017, 04:13 PM
  3. Take an average between the first Tuesday of every month
    By labogola in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2014, 06:49 AM
  4. Calculate 1st Tuesday or 3rd Friday of month
    By BRISBANEBOB in forum Excel General
    Replies: 3
    Last Post: 11-11-2009, 05:51 PM
  5. VBA to get 2nd Tuesday of month
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2008, 11:17 PM
  6. Payments on second Tuesday of every month
    By Lecxe Pleh in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-18-2008, 02:31 AM
  7. Calculating first/last Monday, Tuesday, etc. in a given month in E
    By Rossta in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2006, 09:25 PM
  8. Display the 1st Tuesday of every Month?
    By texcel in forum Excel General
    Replies: 0
    Last Post: 02-02-2005, 04:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1