+ Reply to Thread
Results 1 to 6 of 6

determine the last business day before 15th of each month

  1. #1
    Registered User
    Join Date
    10-31-2014
    Location
    canada
    MS-Off Ver
    2007
    Posts
    64

    determine the last business day before 15th of each month

    Hi,

    I need to determine the last business day before 15th of each month and last business day of each month. The equitation (Second_pay_day) returns the value and format that I want, but how to apply it to the business day before 15th? For example, Second_pay_day returns the exact last business day of each month if I change any_date to 11/1/2019 or 12/1/2019. What I want is using the same method to returns value 10/11/2019 for October, 10/13/2019 for November and 12/11/2019 for December......

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: determine the last business day before 15th of each month

    Possibly...
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,420

    Re: determine the last business day before 15th of each month

    Quote Originally Posted by pmchris View Post
    I need to determine the last business day before 15th of each month and last business day of each month.

    What I want is using the same method to returns value 10/11/2019 for October, 10/13/2019 for November and 12/11/2019 for December......
    Your examples above do not seem to make sense to me. What exactly is a "business day" for you... the day before the 15th if it is a weekday or the Friday before the 15th?

  4. #4
    Registered User
    Join Date
    10-31-2014
    Location
    canada
    MS-Off Ver
    2007
    Posts
    64

    Re: determine the last business day before 15th of each month

    Maybe I did not express clearly. so if the 15th is business day, then the last business day sits on 15th, if the 15th is weekend, then the last business day should be Friday before the 15th. for example, I want to return 10/15/2019 for October 2019, return 11/15/2019 for November 2019, and return 12/13/2019 for December 2019.

    BTW, is there easy way to return what I want? for example, I use Second_pay_day = WorksheetFunction.workday(DateSerial(Year(any_date), Month(any_date) + 1, 1), -1) to get last business day of moth, is there similar expression?

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,420

    Re: determine the last business day before 15th of each month

    Seems like there should be a shorter formula than this, but this is what I came up with. Here I have assumed your "any_date" is in cell A1.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,420

    Re: determine the last business day before 15th of each month

    Whoops! I just realized... this is the Programming sub-forum.

    This macro should do what you want...
    Please Login or Register  to view this content.


    As for a better formula than the one I posted in Message #5, we can use the above code as a guide to craft one...
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 10-09-2019 at 10:41 AM.

+ 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: 3
    Last Post: 01-08-2021, 02:55 PM
  2. [SOLVED] Populate 15th of month or next business day
    By tntmm6 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 02:48 PM
  3. Replies: 2
    Last Post: 09-16-2009, 06:50 PM
  4. Need to add income only between 1st and 15th of each month
    By RickyP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2008, 02:29 PM
  5. Last business day of month function +1,2,3,4 business days
    By dstock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2008, 06:08 PM
  6. Formatting for 15th and last day of the month
    By Emilio Guerra in forum Excel General
    Replies: 1
    Last Post: 12-01-2005, 11:20 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