+ Reply to Thread
Results 1 to 3 of 3

Date function agruments

  1. #1
    Registered User
    Join Date
    02-24-2010
    Location
    Augusta, Maine
    MS-Off Ver
    Excel 2007
    Posts
    15

    Date function agruments

    Trying exclude holidays in this argument. Basically if the Holiday falls on the weekday result I need to push the end date to the next weekday or back one weekday.

    For example:
    =C7+45+LOOKUP(WEEKDAY(C7+45),{1,2,7},{-2,0,-1})

    The date in C7 is 7/23/2010 the result is 9/06/2010 which is Labor day. I want the result of 09/03/2010 or 09/07/2010.

    Any suggestions on how to add the lookup value for HOLIDAYS in this formula?

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Date function agruments

    Since this scenario could repeat for any number of holidays, you might opt for using a look up table containing the dates of each holiday, then nest the formula in an IF Function to test whether to increment or not based on a matching date against a holiday. You have done this in principle with the formula, but a table would be a better choice
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date function agruments

    Did we not cover this already: http://www.excelforum.com/excel-prog...arguments.html

    =WORKDAY(C7+46,-1,holidays) -> 3rd Sep

    or conversely

    =WORKDAY(C7+44,1,holidays) -> 7th Sep

    where holidays is a named range containing public holidays (ie incl. 6-Sep-2010)

+ 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