+ Reply to Thread
Results 1 to 4 of 4

Help with workday function from existing array

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Lincoln, Nebraska
    MS-Off Ver
    Excel 2007
    Posts
    2

    Help with workday function from existing array

    Hello, this is my first post and hopefully you all can help me out!

    I am working on a project that has a column titled, "CalcBegDate" as well as "CalcEndDate". It is for a bank contract where we pay once a month for a swap transaction. I have already gone through and calculated the dates for a number of these swaps (For example, one swap may need to be paid on the first of every month. I have in the "CalcEndDate" column..."03/01/12...04/01/12....05/01/12...and so on"). Well, I was not reading the contracts well enough and forgot to account for the business days and holidays (Because not every 1st of the month will be during the week and not a holiday). I would like a formula that can calculate the correct "CalcEndDate" given I have already made each one the first of the month. So basically the formula will know if my date is correct, and if, not it will know to change it to the correct first business day of the month. I would like it to correct my mistake if possible because I have done a number of these incorrectly so I am looking for a formula that I can drag down to save me some time.

    Basically I have the columns, "CalcBegDate" and "CalcEndDate" which are both incorrect. I am wondering if you could use an If function along with the workday function to check to see if some of may days happen to fall on the correct first business day of the month and if not, could change it to the correct date.

    Any suggestions are welcome! Thank you in advance, I really appreciate it!


    Andrew

  2. #2
    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: Help with workday function from existing array

    =WORKDAY(A1-1, 1, Holidays) will give the first workday on or after the date in A1.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-18-2012
    Location
    Lincoln, Nebraska
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Help with workday function from existing array

    Thank you for the response! I just have another small question, is "holidays" something that I type in to the last part of the formula or make a list of holidays and reference that?

    Thanks!

    Andrew

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Help with workday function from existing array

    You need to create a list of holidays, then you can either name that range [select range > right-click > Name a Range.....] and use that name in the formula, as per shg's suggestion, or you can just reference the range directly in the formula like

    =WORKDAY(A1-1,1,$H$2:$H$10)

    assuming holidays listed in the range H2:H10
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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