+ Reply to Thread
Results 1 to 7 of 7

increment date by one day

Hybrid View

  1. #1
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Explanation for: E11: =E10-WEEKDAY(E10,2)+1

    With 
    E10: (a date)
    E11: =E10-WEEKDAY(E10,2)+1
    
    WEEKDAY(E10,2) returns the weekday_number of the date in E10
    where: Mon = 1, Tue = 2, Wed = 3, Thu = 4, Fri = 5, Sat = 6, Sun = 7
    So...If you subtract a date's weekday_num from the date,
    the result is the Sunday date prior to that date.

    Adding 1 to that value is the Monday date for the week containing the date in E10.

    Example:
    E10: 07/15/2008.....(a Tuesday)
    • WEEKDAY(E10,2)....returns: 2
    • =E10-WEEKDAY(E10,2) 
      =07/15/2008 - 2 days
      =07/13/2008......(a Sunday)
    • =E10-WEEKDAY(E10,2)+1
      =07/15/2008 - 2 days + 1 day
      =07/14/2008......(a Monday)
    Note: You can designate which day you want the week to start on
    in the WEEKDAY function by setting the 2nd argument value.
    See Excel Help on that function for the details.

    I hope that helps.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  2. #2
    Registered User
    Join Date
    07-17-2008
    Location
    California
    Posts
    11

    Question

    Hi, Ron -

    I'm seeing this in other formulas that I'm coming across and am not sure why it's written this way. You used it above:
    F11: =+E11+1
    Why is there a + sign right after the = sign? Why not just write it
    F11: =E11+1
    When I plug it in, I'm not seeing a difference either way.

    Curious,

    Emil

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    =+Ref vs =Ref

    You're correct...in that instance, there's no difference.
    I don't routinely type the equal sign AND the leading plus sign (+).
    It's probably there because I typed the plus sign then selected
    cell E11 (and Excel put the equal sign in for me). Other times I may start
    with the equal sign before selecting cells.

    I hope that helps.

+ 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