+ Reply to Thread
Results 1 to 3 of 3

Convert a Working Day for Holidays and 2nd & 4th Saturday off into a User Defined Function

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Convert a Working Day for Holidays and 2nd & 4th Saturday off into a User Defined Function

    Dear Gurus,

    I have come across a Logical Code to get the working days between two dates..Start and End Date including the Holidays List and also exclude all the 2nd and 4th Saturdays of a month.

    The code mentioned below works fine but I would appreciate if someone could help me convert the same to a UDF so that I can use the same in multiple files instead of replicating the code in several different files...

    I got this code from the below website...

    'http://forum.chandoo.org/threads/how-to-calculate-networkdays-excluding-2nd-4th-saturday-of-month.12501/

    Please Login or Register  to view this content.
    This works excellently however I do not know how to convert the same in User Defined Function - UDF.

    Regards
    e4excel
    Last edited by e4excel; 12-01-2015 at 04:00 AM.

  2. #2
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Convert a Working Day for Holidays and 2nd & 4th Saturday off into a User Defined Func

    Dear Gurus,

    Can someone please spare some time to convert this into a VBA CODE please.

    Regards
    e4excel

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Convert a Working Day for Holidays and 2nd & 4th Saturday off into a User Defined Func

    I do not think the proposed formula is:
    1) well suited to be adopted as UDF
    2) error free - see what happens if a holiday is 2nd or 4th Saturday

    If you just want UDF that calculates networkdays taking care of holidays, and working 2nd and 4th Sat - see http://excel.bucki.pl/networkdays-2nd-4th-saturday/
    But as I said - it is different algorithm.
    Best Regards,

    Kaper

+ 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. [SOLVED] Convert Formula to User-Defined Function
    By SoothSailor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2014, 11:53 AM
  2. Help to Convert to User Defined Function-Sumproduct
    By susuyesyes in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2014, 11:54 AM
  3. User Defined Function Not Working Without Quotations
    By PrizeGotti in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2013, 11:38 AM
  4. Convert Array Formula into VBA User Defined Function
    By hhhhwong in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2013, 12:38 AM
  5. user defined fuction not recognized / not working
    By ztodd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2009, 03:09 PM
  6. Counting Weekdays + Saturday, omit holidays
    By bryceowen in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-20-2008, 11:29 AM
  7. vlookup path not working in UDF (User Defined Function)
    By miagovino in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2007, 01:16 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