Results 1 to 3 of 3
  1. #1
    troy is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2016
    Posts
    1

    Require previous working day minus public holidays

    I am newish to MS Access.
    I require the equivalent formula from excel to mc access which will workout -1 day from my data-set less weekends/public holidays.


    So this is what i use in excel atm: =WORKDAY(start date,days,[holidays])
    Any help would be greatly appreciated.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    there isn't a formula as such, it has to be done with vba code. If you look to the bottom of this thread you will see at least two threads on the same subject.

    Take a look at those and understand them and try them, then come back with a question if it is not working as you require.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    also found this thread that refers to calling the workday function (or any function) from excel to be used in access

    https://msdn.microsoft.com/en-us/lib...ffice.12).aspx

    it covers how to get your data into a form suitable to be used by the function. in essence

    Code:
    Function UseExcelWorkdayFunction() as long
    'install excel xx.x object library in references
    Dim xl As Excel.Application
    
    ... 
    ...
    get your data into form required
    ...
    ...
    
    Set xl = New Excel.Application
    
    UseExcelWorkdayFunction = xl.WorkDay(start date, days, [Holidays])
    
    set xl=nothing
    
    End Function

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 03-25-2015, 12:49 PM
  2. Replies: 5
    Last Post: 07-01-2014, 02:28 PM
  3. Replies: 1
    Last Post: 01-04-2014, 09:44 PM
  4. Replies: 8
    Last Post: 10-20-2012, 11:25 AM
  5. public instead of dim not working
    By DKY in forum Access
    Replies: 1
    Last Post: 10-14-2008, 11:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums