+ Reply to Thread
Results 1 to 4 of 4

Get the next first or third Thursday

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    Geneva, IL
    MS-Off Ver
    2010
    Posts
    2

    Get the next first or third Thursday

    What I want is a function that calculates the next first or third Thursday.

    I currently have the following function in cell B4.

    =IF(B3-DAY(B3)+1+7*1-WEEKDAY(B3-DAY(B3)+1-5)=B3,B3-DAY(B3)+1+7*3-WEEKDAY(B3-DAY(B3)+1-5),DATE(YEAR(B3),MONTH(B3)+1,DAY(B3))-DAY(B3)+1+7*1-WEEKDAY(DATE(YEAR(B3),MONTH(B3)+1,DAY(B3))-DAY(DATE(YEAR(B3),MONTH(B3)+1,DAY(B3)))+1-5))

    The explanation is as follows: If the date in cell B3 is the first thursday of the month, make this cell the third thursday of the same month. Otherwise, make this field the first thursday of the next month.

    Is there an easier way to do this??


    Thanks!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Get the next first or third Thursday

    I think this does what you want.

    B3 = some date

    This formula entered in B4:

    =IF(AND(INT((DAY(B3)+6)/7)=1,WEEKDAY(B3)=5),B3+14,EOMONTH(B3,0)+1+MOD(4-WEEKDAY(EOMONTH(B3,0)),7))

    Format as Date
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-17-2014
    Location
    Geneva, IL
    MS-Off Ver
    2010
    Posts
    2

    Re: Get the next first or third Thursday

    Thank you! That worked.

    At some point in time, I'll have to break down the formula to figure out what it's actually doing! LOL

    Thanks, again!
    Mark

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Get the next first or third Thursday

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. 1st and 3rd Thursday formula
    By David in forum Excel General
    Replies: 16
    Last Post: 01-02-2018, 04:38 PM
  2. Replies: 5
    Last Post: 01-08-2013, 11:38 AM
  3. Subtracting 1 day when the weekday is a Thursday
    By Kinna in forum Excel General
    Replies: 2
    Last Post: 05-28-2009, 03:56 PM
  4. 2nd Thursday of the month
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2006, 12:10 AM
  5. next thursday formula?
    By Ctrl in forum Excel General
    Replies: 3
    Last Post: 02-16-2006, 03:31 AM

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