+ Reply to Thread
Results 1 to 6 of 6

IF and MIN functions

  1. #1
    JN
    Guest

    IF and MIN functions

    Hi,

    I've been trying to fix the following formula but can't figure out why.

    IF(OR(AG2<0,AE2<="07/29/05"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))

    What I am trying to do here is if the "Amt remained" is less than 0, OR
    "Date" is less than 07/29/05, I want colum AH to show 0. Otherwise, apply the
    calculations, which splits the amount into 2005 and 2006. However, I can't
    make the formula show 0 for the dates that is less than 07/29/05. I am not
    sure if it has to do with the MIN().

    AE AG AH
    AI
    Date Amt Remained 2005 Portion
    2006 Portion
    2 1/22/93 $66,102 $2,246
    $63,856
    3 7/31/06 $27,349 $11,587
    $15,762


    Thanks!


  2. #2
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    Try replace "07/29/05" with 38562

    ie. IF(OR(AG2<0,AE2<=38562),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))

    Just a reminder, n your formula you also excluded the date of 07/29/05.


    Hope this helps.



    Quote Originally Posted by JN
    Hi,

    I've been trying to fix the following formula but can't figure out why.

    IF(OR(AG2<0,AE2<="07/29/05"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))

    What I am trying to do here is if the "Amt remained" is less than 0, OR
    "Date" is less than 07/29/05, I want colum AH to show 0. Otherwise, apply the
    calculations, which splits the amount into 2005 and 2006. However, I can't
    make the formula show 0 for the dates that is less than 07/29/05. I am not
    sure if it has to do with the MIN().

    AE AG AH
    AI
    Date Amt Remained 2005 Portion
    2006 Portion
    2 1/22/93 $66,102 $2,246
    $63,856
    3 7/31/06 $27,349 $11,587
    $15,762


    Thanks!

  3. #3
    Bob Phillips
    Guest

    Re: IF and MIN functions

    Try this

    IF(OR(AG2<0,AE2<=--"2005-07-29"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE(--"2005
    -12-31",--"2005-07-29")/NETWORKDAYS(--"2005-07-29",AE2))

    or better yet, put the dates in cells and use the cell refrence.

    --

    HTH

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


    "JN" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I've been trying to fix the following formula but can't figure out why.
    >
    >

    IF(OR(AG2<0,AE2<="07/29/05"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")
    ),"07/29/05")/NETWORKDAYS("07/29/05",AE2))
    >
    > What I am trying to do here is if the "Amt remained" is less than 0, OR
    > "Date" is less than 07/29/05, I want colum AH to show 0. Otherwise, apply

    the
    > calculations, which splits the amount into 2005 and 2006. However, I can't
    > make the formula show 0 for the dates that is less than 07/29/05. I am not
    > sure if it has to do with the MIN().
    >
    > AE AG AH
    > AI
    > Date Amt Remained 2005 Portion
    > 2006 Portion
    > 2 1/22/93 $66,102 $2,246
    > $63,856
    > 3 7/31/06 $27,349 $11,587
    > $15,762
    >
    >
    > Thanks!
    >




  4. #4
    JN
    Guest

    Re: IF and MIN functions

    Thanks. I used a cell reference at first, but it didn't work. So I typed out
    the date in the formula, and it still doesn't work.


    "Bob Phillips" wrote:

    > Try this
    >
    > IF(OR(AG2<0,AE2<=--"2005-07-29"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE(--"2005
    > -12-31",--"2005-07-29")/NETWORKDAYS(--"2005-07-29",AE2))
    >
    > or better yet, put the dates in cells and use the cell refrence.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "JN" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I've been trying to fix the following formula but can't figure out why.
    > >
    > >

    > IF(OR(AG2<0,AE2<="07/29/05"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")
    > ),"07/29/05")/NETWORKDAYS("07/29/05",AE2))
    > >
    > > What I am trying to do here is if the "Amt remained" is less than 0, OR
    > > "Date" is less than 07/29/05, I want colum AH to show 0. Otherwise, apply

    > the
    > > calculations, which splits the amount into 2005 and 2006. However, I can't
    > > make the formula show 0 for the dates that is less than 07/29/05. I am not
    > > sure if it has to do with the MIN().
    > >
    > > AE AG AH
    > > AI
    > > Date Amt Remained 2005 Portion
    > > 2006 Portion
    > > 2 1/22/93 $66,102 $2,246
    > > $63,856
    > > 3 7/31/06 $27,349 $11,587
    > > $15,762
    > >
    > >
    > > Thanks!
    > >

    >
    >
    >


  5. #5
    JN
    Guest

    Re: IF and MIN functions

    Can I use a cell reference in this formula? That way it's easier to update
    the date since I need to change the date on weekly basis.

    Or is there any way to approach to this formula?
    Thanx


    "Morrigan" wrote:

    >
    > Try replace "07/29/05" with 38562
    >
    > ie.
    > IF(OR(AG2<0,AE2<=38562),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))
    >
    > Just a reminder, n your formula you also excluded the date of
    > 07/29/05.
    >
    >
    > Hope this helps.
    >
    >
    >
    > JN Wrote:
    > > Hi,
    > >
    > > I've been trying to fix the following formula but can't figure out
    > > why.
    > >
    > > IF(OR(AG2<0,AE2<="07/29/05"),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))
    > >
    > > What I am trying to do here is if the "Amt remained" is less than 0,
    > > OR
    > > "Date" is less than 07/29/05, I want colum AH to show 0. Otherwise,
    > > apply the
    > > calculations, which splits the amount into 2005 and 2006. However, I
    > > can't
    > > make the formula show 0 for the dates that is less than 07/29/05. I am
    > > not
    > > sure if it has to do with the MIN().
    > >
    > > AE AG AH
    > > AI
    > > Date Amt Remained 2005 Portion
    > > 2006 Portion
    > > 2 1/22/93 $66,102 $2,246
    > > $63,856
    > > 3 7/31/06 $27,349 $11,587
    > > $15,762
    > >
    > >
    > > Thanks!

    >
    >
    > --
    > Morrigan
    > ------------------------------------------------------------------------
    > Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
    > View this thread: http://www.excelforum.com/showthread...hreadid=388067
    >
    >


  6. #6
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    329
    IF(OR(AG2<0,AE2<=value(<reference cell>)),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))



    [QUOTE=JN]Can I use a cell reference in this formula? That way it's easier to update
    the date since I need to change the date on weekly basis.

    Or is there any way to approach to this formula?
    Thanx


    "Morrigan" wrote:
    [color=blue]
    >
    > Try replace "07/29/05" with 38562
    >
    > ie.
    > IF(OR(AG2<0,AE2<=38562),0,AG2*NETWORKDAYS(MIN(AE2,DATEVALUE("12/31/05")),"07/29/05")/NETWORKDAYS("07/29/05",AE2))
    >
    > Just a reminder, n your formula you also excluded the date of
    > 07/29/05.
    >
    >
    > Hope this 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