+ Reply to Thread
Results 1 to 2 of 2

Date in a cell Excluding Holidays?

  1. #1
    Registered User
    Join Date
    07-11-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Talking Date in a cell Excluding Holidays?

    Hi All

    I have a problem putting this code in VBA

    Function Modfolday(d, Holidays)

    If (IsError(Application.Match(d, Holidays, 0)) = False) Or (WorksheetFunction.Weekday(d, 2) = 6) Or (WorksheetFunction.Weekday(d, 2) = 7) Then
    dm = WorksheetFunction.WorkDay(d, 1, Holidays)
    If Month(dm) > Month(d) Then
    Modfolday = WorksheetFunction.WorkDay(d, -1, Holidays)
    Else
    Modfolday = WorksheetFunction.WorkDay(d, 1, Holidays)
    End If
    Else
    Modfolday = d
    End If

    End Function



    it is not running?


    I am quite behind with VBA so please can you assist step by step..

  2. #2
    Registered User
    Join Date
    07-11-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Date in a cell Excluding Holidays?

    please help... I have to send a report out tom

    this was my first code

    =IF('Trade Capture'!I16>27,"move to next unless EOM","move to next")


    but I had to expand it so that if there is a hols than it would move.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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