Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 10 of 10

Thread: IF conditional Statements...again

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    C Hawk
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ok folks..last one.

    IF A2>=95% then payout equals 100%
    IF A2=94% then payout equals 94%
    IF A2=93% then payout equals 93%

    So basically I need code to say that if A2 is above 95% the payout is 100%
    94 = 94
    93 = 93
    92 = 92

    and so on down to 50%

    ALL IN ONE STATEMENT.

    Thanks

    [ This Message was edited by: investr on 2002-05-02 10:20 ]

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,637
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-05-02 10:19, investr wrote:
    Ok folks..last one.

    IF A2>=95% then payout equals 100%
    IF A2=94% then payout equals 94%
    IF A2=93% then payout equals 93%

    So basically I need code to say that if A2 is above 95% the payout is 100%
    94 = 94
    93 = 93
    92 = 92

    and so on down to 50%

    ALL IN ONE STATEMENT.

    Thanks [img]/board/images/smiles/icon_smile.gif[/img]

    [ This Message was edited by: investr on 2002-05-02 10:20 ]
    Is it not:

    =(A1>=95%)*100%+(A1<95%)*A1

    or, if you like,

    =IF(A1>=95%,100%,A1)


  3. #3
    New Member
    Join Date
    Apr 2002
    Location
    C Hawk
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have this
    =IF(A9>=95%, 100%, IF(A9=94%, 94%))

    but that doesn't help me with 93% = 93% and 92% = 92% etc...

    I need this ALL in ONE statement

    So if I plug in 96% in A2 then A3 says 100%
    if I plug in 94% in A2 then A3 says 94%
    and so on..get it?

  4. #4
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,637
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-05-02 10:29, investr wrote:
    I have this
    =IF(A9>=95%, 100%, IF(A9=94%, 94%))

    but that doesn't help me with 93% = 93% and 92% = 92% etc...

    I need this ALL in ONE statement

    So if I plug in 96% in A2 then A3 says 100%
    if I plug in 94% in A2 then A3 says 94%
    and so on..get it?
    No, I don't get it.

    Did you try what I suggested?

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,308
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hey again,

    I'm still not sure what's wrong with:

    =IF(A2>=95%,100%,A2) '--as you remember this was posted in your other thread as well as Aladin's post above.

    Does it have something to do with your lower extreme of 50%? If A2<50% do you want the formula to still output 50%?

    For example:
    =IF(A2>=95%,100%,IF(A2<50%,50%,A2))

    This basically states:
    IF A2>=95% then output 100%
    IF A2<50% then output 50%
    Otherwise output A2 - this seems to fit your description

    If this is incorrect then please specify exactly what we're missing - as there appears to be something I'm not quite getting.

    Hope that helps
    Adam


  6. #6
    New Member
    Join Date
    Apr 2002
    Location
    C Hawk
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I need this all on ONE formula.

    This is what I need cell B2 to have happen..in my laymen terms...

    IF A2>=95% then output 100%
    IF A2=94% then output 94%
    IF A2=93% then output 93%

    Down to 85% would be fine.

    So if I knew how to combine all those conditions into one I would do it. That is why I am posting one at a time. ) So I need the formula to do all of what I stated above in ONE formula for cell B2

    _________________
    thanks!
    C Hawk

    [ This Message was edited by: investr on 2002-05-02 10:58 ]

    [ This Message was edited by: investr on 2002-05-02 10:59 ]

  7. #7
    Board Regular
    Join Date
    Apr 2002
    Location
    Minnesota
    Posts
    821
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =if(or(a2>.95,a2=.95),1,a2)

    This will return the value that is in A2 as your payout if it is less than .95

  8. #8
    New Member
    Join Date
    Apr 2002
    Location
    C Hawk
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    BINGO!!!!!!!!!!

    Thanks. Now that is what i needed.

  9. #9
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,308
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ok

    I'm going to break out your conditions in effort to see where the miscommunication is.

    Condition 1:

    Based on your description: the output value that you need in B2 appears to be the exact same as the input value in A2 -as long as A2 is <95%.

    In Summary for Condition 1:

    IF A2<95% then B2=A2

    'e.g. if A2=94% then output the value 94% in cell B2. Likewise if A2=65% then B2 outputs 65%. --Does this not agree with your example?

    Condition 2:

    You want B2 to output 100% if A2 holds a value greater than or equal to 95%. So if A2=95%, then B2 outputs 100%. Likewise if A2=99% then B2 outputs 100%.

    In Summary for condition 2:
    IF A2>=95% then B2=100%


    Total formula:

    Therefore merging these 2 conditions into one formula:

    =IF(A2>=95%,100%,A2) '-typed in B2

    I'm really not seeing any difference in explanations between your last few posts. This formula seems to cover all requested conditions.

    Any help?
    Adam


  10. #10
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,308
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    lol!

    Nevermind

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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