Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Same Day of Week Last Year

    I need to compare daily results of operation on a day-of-week basis so that I'm comparing Sunday to Sunday instead of Mar 22, 2015 vs. Mar 23, 2014. The obvious solution is to enter this year's date in a cell and then refer to that cell including an offset of one, like this:=DATE(YEAR(B6)-1,MONTH(B6),DAY(B6))+1 (see attached)

    But wont that get me in trouble in a leap year? How can the formula be adjusted so that the offset day is calculated?

  2. #2
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi

    ..you need to forget about years and leap years, and just remember there are 52 weeks x 7 days in a year for your purposes.
    So, a date in [B6] and for the same day last year, just use =B6-(52*7)
    ..or just = B6-364
    ..try it!

    zeddy

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks Zeddy. I was overthinking the problem. Again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •