+ Reply to Thread
Results 1 to 6 of 6

Date minus 2 days back

  1. #1
    Registered User
    Join Date
    06-06-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Date minus 2 days back

    Hello

    I've been trying to get this formula working but with no such luck.

    I'm trying to get a cell to calculate 2 days back from another date in a cell.

    any help would be much appreciated.

    Thank you,

    Mk
    Last edited by NBVC; 06-07-2011 at 08:15 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Date minus 2 days back

    You can just use subtraction.

    Eg. A2-2 where A2 contains the original date.

    you may need to format the result cell as date to look right.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-06-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Date minus 2 days back

    Wow! very easy and it works! Thank you.

    if the date that had been taken back 2 days landed on a weekend (Sat, Sun) could i force it to go to the previous Friday?

    Thanks again!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Date minus 2 days back

    Try:

    =E1-IF(WEEKDAY(E1-2,2)=6,3,IF(WEEKDAY(E1-2,2)=7,4,2))

  5. #5
    Registered User
    Join Date
    06-06-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Date minus 2 days back

    Thank you! It worked! Legend man.

    I made a little change because i wanted it to go back 2 days no matter what the day was. So if it was Monday it went back to Friday but i needed 2 days back, so i changed it to

    =E1-IF(WEEKDAY(e1-2,2)=6,4,IF(WEEKDAY(E1-2,2)=7,4,2))

    That seems to work, does it look ok? i just changed to 3 to a 4!

    Thank you

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Date minus 2 days back

    If that is the case, I wonder if this would work.

    =WORKDAY(E1,-2)

    This is an Analysis Toolpak function.. If you get a #NAME! error, then go to Tools|Addins and select Analysis Toolpak.

+ 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