+ Reply to Thread
Results 1 to 9 of 9

Find First Workday of Month Value Excl Holiday

  1. #1
    Registered User
    Join Date
    06-17-2010
    Location
    So Cal
    MS-Off Ver
    Excel 2003
    Posts
    27

    Find First Workday of Month Value Excl Holiday

    Ok, so I’m trying to come up with a single cell formula that will find for me the value corresponding to the first weekday of a daily time series – ignoring specified holidays.

    In the attached worksheet under “Current State,” you can see the formula I’m using to determine the first weekday (cell K5) and retrieve the inventory level corresponding to that day (cell K6).

    The section underneath, “Ideal State,” shows what I want to accomplish (all hardwired of course for now). Note the specified holidays (name: arrayHolidays). Cell K17 should refer to this array and see that 4/1 is a designated holiday and move on. 4/2 and 4/3 is the weekend so it lands on 4/4 as the first applicable weekday.

    Any advice on how to formulate cell K17 would be greatly appreciated – and please don’t feel obligated to follow the same logic as K5 (which I suspect could be more elegant in itself).
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Find First Workday of Month Value Excl Holiday

    Use the WORKDAY function.

    =workday(B5,0,G20:G24)

    Does that work?

  3. #3
    Registered User
    Join Date
    06-17-2010
    Location
    So Cal
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Find First Workday of Month Value Excl Holiday

    Quote Originally Posted by brokenbiscuits View Post
    Use the WORKDAY function.

    =workday(B5,0,G20:G24)

    Does that work?
    Thanks for the response, broken.

    Unfortunately, workday in itself won’t work. It’s still returning 4/1 as the first applicable workday despite reference to the 4/1 holiday.

    I am using “NETWORKDAYS(B5,TODAY(),Holidays)” to count the number of applicable days but I am having trouble applying this formula to pick out the date itself. I’m wondering if I can use networkdays in conjunction with offset to get me there?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Find First Workday of Month Value Excl Holiday

    check your dates one says 04/01 the other 04/04
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    06-17-2010
    Location
    So Cal
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Find First Workday of Month Value Excl Holiday

    Quote Originally Posted by martindwilson View Post
    check your dates one says 04/01 the other 04/04
    what my formula gives me now vs what i want it to give me.

    Quote Originally Posted by the.ronin View Post
    In the attached worksheet under “Current State,” you can see the formula I’m using to determine the first weekday (cell K5) and retrieve the inventory level corresponding to that day (cell K6).

    The section underneath, “Ideal State,” shows what I want to accomplish (all hardwired of course for now).

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Find First Workday of Month Value Excl Holiday

    try
    =WORKDAY(DATE(YEAR(A1),MONTH(A1),0),1,$G$1:$G$5) where a1 is date g1:g5 holidays

  7. #7
    Forum Contributor Charlie_Howell's Avatar
    Join Date
    09-27-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Find First Workday of Month Value Excl Holiday

    =WORKDAY(B5-1,1,$G$8:$G$12) put this in (K5)
    Last edited by Charlie_Howell; 04-14-2011 at 09:14 PM.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find First Workday of Month Value Excl Holiday

    Maybe =WORKDAY(EOMONTH(B5, -1), 1, Holidays)

    For Excel 2003-, requires the Analysis ToolPak.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Contributor Charlie_Howell's Avatar
    Join Date
    09-27-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Find First Workday of Month Value Excl Holiday

    =WORKDAY(EOMONTH(B5, -1), 1, arrayHolidays)

+ 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