+ Reply to Thread
Results 1 to 19 of 19

Adjusting Date Results

  1. #1
    Bob Phillips
    Guest

    Re: Adjusting Date Results

    Joe,

    Try this

    =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "JoeKazz" <[email protected]> wrote in message
    news:[email protected]...
    > I am using Excel 2002. I would like to understand how to have a date

    result
    > from a formula change the date to a Monday, should the result be a

    Saturday
    > or Sunday date. For instance, my return date should be sixteen days from
    > today. But if the return date is Saturday or Sunday, make the return date

    a
    > Monday. I fooled around to get a formula to work, but only for five rows.
    > Then, the formula returned a normal X + 16 result.
    > A B C
    > 1 08/01/05 08/17/05 Wednesday
    > Formula ColumnC:
    > A1+16
    > Format Column C:

    dddd
    > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > The formula did not work with Saturday/Sunday in quotes " ". I also
    > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    formula
    > only worked for dates 8/1/05 through 8/5/05, then the result was always

    the
    > date plus 16.




  2. #2
    JoeKazz
    Guest

    Re: Adjusting Date Results

    Bob:

    Oh my God, thank you!!!! It works, it works, it works!!!

    "Bob Phillips" wrote:

    > Joe,
    >
    > Try this
    >
    > =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "JoeKazz" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am using Excel 2002. I would like to understand how to have a date

    > result
    > > from a formula change the date to a Monday, should the result be a

    > Saturday
    > > or Sunday date. For instance, my return date should be sixteen days from
    > > today. But if the return date is Saturday or Sunday, make the return date

    > a
    > > Monday. I fooled around to get a formula to work, but only for five rows.
    > > Then, the formula returned a normal X + 16 result.
    > > A B C
    > > 1 08/01/05 08/17/05 Wednesday
    > > Formula ColumnC:
    > > A1+16
    > > Format Column C:

    > dddd
    > > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > > The formula did not work with Saturday/Sunday in quotes " ". I also
    > > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    > formula
    > > only worked for dates 8/1/05 through 8/5/05, then the result was always

    > the
    > > date plus 16.

    >
    >
    >


  3. #3

    Re: Adjusting Date Results

    A general formula for moving past the weekend
    =IF(WEEKDAY(A1,2)>5,A1-WEEKDAY(A1,2)+8,A1)
    or
    =WORKDAY(WORKDAY(A1,-1),1)

    And for your specific need of +16ish days
    =IF(WEEKDAY(A1+16,2)>5,A1-WEEKDAY(A1,2)+8+16,A1+16)
    or
    =WORKDAY(WORKDAY(A1+16,-1),1)

    These remove the need for your helper columns
    Not sure what you are saying about defined names. If this does not solve
    your problem then please post back

    I am not sure which of the equations, I have offered, is most efficient
    and would appriciate any comments about that.

    hth RES

  4. #4
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Tue, 9 Aug 2005 17:26:56 +0100, [email protected] wrote:

    >=WORKDAY(WORKDAY(A1+16,-1),1)


    Or, a bit simpler:

    =WORKDAY(A1+15,1)




    --ron

  5. #5

    Re: Adjusting Date Results

    Ron
    nice - it's always good learning when you miss the obvious

    is there a simple option if you want to move Sat and Sum forward to Mon
    eg. better then
    >=WORKDAY(WORKDAY(A1,-1),1)


    cheers RES

  6. #6
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Wed, 10 Aug 2005 11:43:27 +0100, [email protected] wrote:


    >
    >is there a simple option if you want to move Sat and Sum forward to Mon
    >eg. better then
    >>=WORKDAY(WORKDAY(A1,-1),1)


    Yep: =workday(A1-1,1)


    >
    >cheers RES




    --ron

  7. #7
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Wed, 10 Aug 2005 11:43:27 +0100, [email protected] wrote:


    >
    >is there a simple option if you want to move Sat and Sum forward to Mon
    >eg. better then
    >>=WORKDAY(WORKDAY(A1,-1),1)


    Yep: =workday(A1-1,1)


    >
    >cheers RES




    --ron

  8. #8

    Re: Adjusting Date Results

    Ron
    nice - it's always good learning when you miss the obvious

    is there a simple option if you want to move Sat and Sum forward to Mon
    eg. better then
    >=WORKDAY(WORKDAY(A1,-1),1)


    cheers RES

  9. #9
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Tue, 9 Aug 2005 17:26:56 +0100, [email protected] wrote:

    >=WORKDAY(WORKDAY(A1+16,-1),1)


    Or, a bit simpler:

    =WORKDAY(A1+15,1)




    --ron

  10. #10

    Re: Adjusting Date Results

    A general formula for moving past the weekend
    =IF(WEEKDAY(A1,2)>5,A1-WEEKDAY(A1,2)+8,A1)
    or
    =WORKDAY(WORKDAY(A1,-1),1)

    And for your specific need of +16ish days
    =IF(WEEKDAY(A1+16,2)>5,A1-WEEKDAY(A1,2)+8+16,A1+16)
    or
    =WORKDAY(WORKDAY(A1+16,-1),1)

    These remove the need for your helper columns
    Not sure what you are saying about defined names. If this does not solve
    your problem then please post back

    I am not sure which of the equations, I have offered, is most efficient
    and would appriciate any comments about that.

    hth RES

  11. #11
    JoeKazz
    Guest

    Re: Adjusting Date Results

    Bob:

    Oh my God, thank you!!!! It works, it works, it works!!!

    "Bob Phillips" wrote:

    > Joe,
    >
    > Try this
    >
    > =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "JoeKazz" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am using Excel 2002. I would like to understand how to have a date

    > result
    > > from a formula change the date to a Monday, should the result be a

    > Saturday
    > > or Sunday date. For instance, my return date should be sixteen days from
    > > today. But if the return date is Saturday or Sunday, make the return date

    > a
    > > Monday. I fooled around to get a formula to work, but only for five rows.
    > > Then, the formula returned a normal X + 16 result.
    > > A B C
    > > 1 08/01/05 08/17/05 Wednesday
    > > Formula ColumnC:
    > > A1+16
    > > Format Column C:

    > dddd
    > > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > > The formula did not work with Saturday/Sunday in quotes " ". I also
    > > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    > formula
    > > only worked for dates 8/1/05 through 8/5/05, then the result was always

    > the
    > > date plus 16.

    >
    >
    >


  12. #12
    Bob Phillips
    Guest

    Re: Adjusting Date Results

    Joe,

    Try this

    =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "JoeKazz" <[email protected]> wrote in message
    news:[email protected]...
    > I am using Excel 2002. I would like to understand how to have a date

    result
    > from a formula change the date to a Monday, should the result be a

    Saturday
    > or Sunday date. For instance, my return date should be sixteen days from
    > today. But if the return date is Saturday or Sunday, make the return date

    a
    > Monday. I fooled around to get a formula to work, but only for five rows.
    > Then, the formula returned a normal X + 16 result.
    > A B C
    > 1 08/01/05 08/17/05 Wednesday
    > Formula ColumnC:
    > A1+16
    > Format Column C:

    dddd
    > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > The formula did not work with Saturday/Sunday in quotes " ". I also
    > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    formula
    > only worked for dates 8/1/05 through 8/5/05, then the result was always

    the
    > date plus 16.




  13. #13
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Wed, 10 Aug 2005 11:43:27 +0100, [email protected] wrote:


    >
    >is there a simple option if you want to move Sat and Sum forward to Mon
    >eg. better then
    >>=WORKDAY(WORKDAY(A1,-1),1)


    Yep: =workday(A1-1,1)


    >
    >cheers RES




    --ron

  14. #14

    Re: Adjusting Date Results

    Ron
    nice - it's always good learning when you miss the obvious

    is there a simple option if you want to move Sat and Sum forward to Mon
    eg. better then
    >=WORKDAY(WORKDAY(A1,-1),1)


    cheers RES

  15. #15
    Ron Rosenfeld
    Guest

    Re: Adjusting Date Results

    On Tue, 9 Aug 2005 17:26:56 +0100, [email protected] wrote:

    >=WORKDAY(WORKDAY(A1+16,-1),1)


    Or, a bit simpler:

    =WORKDAY(A1+15,1)




    --ron

  16. #16

    Re: Adjusting Date Results

    A general formula for moving past the weekend
    =IF(WEEKDAY(A1,2)>5,A1-WEEKDAY(A1,2)+8,A1)
    or
    =WORKDAY(WORKDAY(A1,-1),1)

    And for your specific need of +16ish days
    =IF(WEEKDAY(A1+16,2)>5,A1-WEEKDAY(A1,2)+8+16,A1+16)
    or
    =WORKDAY(WORKDAY(A1+16,-1),1)

    These remove the need for your helper columns
    Not sure what you are saying about defined names. If this does not solve
    your problem then please post back

    I am not sure which of the equations, I have offered, is most efficient
    and would appriciate any comments about that.

    hth RES

  17. #17
    JoeKazz
    Guest

    Re: Adjusting Date Results

    Bob:

    Oh my God, thank you!!!! It works, it works, it works!!!

    "Bob Phillips" wrote:

    > Joe,
    >
    > Try this
    >
    > =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "JoeKazz" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am using Excel 2002. I would like to understand how to have a date

    > result
    > > from a formula change the date to a Monday, should the result be a

    > Saturday
    > > or Sunday date. For instance, my return date should be sixteen days from
    > > today. But if the return date is Saturday or Sunday, make the return date

    > a
    > > Monday. I fooled around to get a formula to work, but only for five rows.
    > > Then, the formula returned a normal X + 16 result.
    > > A B C
    > > 1 08/01/05 08/17/05 Wednesday
    > > Formula ColumnC:
    > > A1+16
    > > Format Column C:

    > dddd
    > > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > > The formula did not work with Saturday/Sunday in quotes " ". I also
    > > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    > formula
    > > only worked for dates 8/1/05 through 8/5/05, then the result was always

    > the
    > > date plus 16.

    >
    >
    >


  18. #18
    Bob Phillips
    Guest

    Re: Adjusting Date Results

    Joe,

    Try this

    =A1+16+(WEEKDAY(A1+16,2)=6)+(WEEKDAY(A1+16,2)>5)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "JoeKazz" <[email protected]> wrote in message
    news:[email protected]...
    > I am using Excel 2002. I would like to understand how to have a date

    result
    > from a formula change the date to a Monday, should the result be a

    Saturday
    > or Sunday date. For instance, my return date should be sixteen days from
    > today. But if the return date is Saturday or Sunday, make the return date

    a
    > Monday. I fooled around to get a formula to work, but only for five rows.
    > Then, the formula returned a normal X + 16 result.
    > A B C
    > 1 08/01/05 08/17/05 Wednesday
    > Formula ColumnC:
    > A1+16
    > Format Column C:

    dddd
    > Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    > The formula did not work with Saturday/Sunday in quotes " ". I also
    > "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The

    formula
    > only worked for dates 8/1/05 through 8/5/05, then the result was always

    the
    > date plus 16.




  19. #19
    JoeKazz
    Guest

    Adjusting Date Results

    I am using Excel 2002. I would like to understand how to have a date result
    from a formula change the date to a Monday, should the result be a Saturday
    or Sunday date. For instance, my return date should be sixteen days from
    today. But if the return date is Saturday or Sunday, make the return date a
    Monday. I fooled around to get a formula to work, but only for five rows.
    Then, the formula returned a normal X + 16 result.
    A B C
    1 08/01/05 08/17/05 Wednesday
    Formula ColumnC:
    A1+16
    Format Column C: dddd
    Formula Column B: =if(c1=Saturday,a1+18,if(c1=Sunday,a1+17,a1+16))
    The formula did not work with Saturday/Sunday in quotes " ". I also
    "INSERT", "NAME", "DEFINE" for all days Sunday through Monday. The formula
    only worked for dates 8/1/05 through 8/5/05, then the result was always the
    date plus 16.

+ 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