+ Reply to Thread
Results 1 to 5 of 5

Determine if a date is a business day or not

  1. #1
    Registered User
    Join Date
    05-16-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    63

    Determine if a date is a business day or not

    I have a spreadsheet that has paycheck dates in it(Column G). We start processing the payroll a week before that. If that day is a non-business day we begin on the previous business day. For example if the paycheck date is 10/12(a Friday) a week before that be 10/05(a Friday). That is good.
    If the paycheck date is 10/14(a Sat) then the start date would be 10/05(a Friday) instead of exactly a week before; which would be Saturday. The start date is in Column E.

    I was playing with IF statements, but can't quite get it. I'm not even sure if that is the easiest way to do it.

    Can anyone recommend a way to do this?

    Thanks,

    Craig

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Determine if a date is a business day or not

    try this..

    =WORKDAY(A1-7,IF(OR(WEEKDAY(A1)=7,WEEKDAY(A1)=1),-1,0))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: Determine if a date is a business day or not

    This should do it.....

    =WORKDAY(A1-7+1,-1)
    Audere est facere

  4. #4
    Registered User
    Join Date
    05-16-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: Determine if a date is a business day or not

    I figured it out. It's kind of a hybrid between the posts

    =IF(WEEKDAY($E8-7)=7,$E8-8,IF(WEEKDAY($E8-7)=1,$E8-9,$E8-7))

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

    Re: Determine if a date is a business day or not

    Wouldn't my version give you the same result more simply?

    =WORKDAY(E8-7+1,-1)

+ 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