+ Reply to Thread
Results 1 to 3 of 3

Need help with a date function formula

  1. #1
    Registered User
    Join Date
    08-29-2005
    Posts
    1

    Need help with a date function formula

    I have an excel sheet header which includes a date, the date is to represent yesterday's date ( =Today()-1 ), which then would come into the spread sheet as August 8th, 2005, assuming today was August 9th. The problem is on days like Monday when the previous day was sunday, how can I make the formula output the Friday before the Monday instead of Sunday ...example on Monday, August 11th, the formula would read August 10th, I need it to read August 8th...? Please help, thanks

  2. #2
    Domenic
    Guest

    Re: Need help with a date function formula

    Try...

    =WORKDAY(TODAY(),-1)

    ....which requires that the Analysis ToolPak be enabled...

    Tools > Add-Ins > and check Analysis ToolPak

    Hope this helps!

    In article <[email protected]>,
    KAA <[email protected]> wrote:

    > I have an excel sheet header which includes a date, the date is to
    > represent yesterday's date ( =Today()-1 ), which then would come into
    > the spread sheet as August 8th, 2005, assuming today was August 9th.
    > The problem is on days like Monday when the previous day was sunday,
    > how can I make the formula output the Friday before the Monday instead
    > of Sunday ...example on Monday, August 11th, the formula would read
    > August 10th, I need it to read August 8th...? Please help, thanks


  3. #3
    David Hepner
    Guest

    RE: Need help with a date function formula

    Try this:

    =IF(WEEKDAY(NOW()-1)=1,(NOW()-3),NOW()-1)

    "KAA" wrote:

    >
    > I have an excel sheet header which includes a date, the date is to
    > represent yesterday's date ( =Today()-1 ), which then would come into
    > the spread sheet as August 8th, 2005, assuming today was August 9th.
    > The problem is on days like Monday when the previous day was sunday,
    > how can I make the formula output the Friday before the Monday instead
    > of Sunday ...example on Monday, August 11th, the formula would read
    > August 10th, I need it to read August 8th...? Please help, thanks
    >
    >
    > --
    > KAA
    > ------------------------------------------------------------------------
    > KAA's Profile: http://www.excelforum.com/member.php...o&userid=26755
    > View this thread: http://www.excelforum.com/showthread...hreadid=400071
    >
    >


+ 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