+ Reply to Thread
Results 1 to 8 of 8

If statement help

  1. #1
    Registered User
    Join Date
    11-08-2005
    Posts
    3

    If statement help

    I am trying to write a formula using multiple if statements or some other method in Excel and I cannot seem to make it work. Here is the scenario:

    If B9 > 0 then calculate value (E9) using (B9/.8) else
    if C9 > 0 then calculate value (E9) using (C9/.9) else
    E9.

    This is an insurance application dealing with coinsurance and conversion to 100%.

    Any ideas would be greatly appreciated.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Question: What do you want to happen if BOTH B9 and C9 are >0?

    Basic formula:

    In E9 =IF(B9>0,B9/.8,IF(C9>0,C9/.9,"N/A"))

    For this example, if B9>0, it won't even look at C9. Is this what you want?

    Good Luck
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Gary''s Student
    Guest

    RE: If statement help

    What if both C9 and B9 are greater than zero?
    --
    Gary''s Student


    "ekfinch" wrote:

    >
    > I am trying to write a formula using multiple if statements or some
    > other method in Excel and I cannot seem to make it work. Here is the
    > scenario:
    >
    > If B9 > 0 then calculate value (E9) using (B9/.8) else
    > if C9 > 0 then calculate value (E9) using (C9/.9) else
    > E9.
    >
    > This is an insurance application dealing with coinsurance and
    > conversion to 100%.
    >
    > Any ideas would be greatly appreciated.
    >
    >
    > --
    > ekfinch
    > ------------------------------------------------------------------------
    > ekfinch's Profile: http://www.excelforum.com/member.php...o&userid=28658
    > View this thread: http://www.excelforum.com/showthread...hreadid=483260
    >
    >


  4. #4
    Elkar
    Guest

    RE: If statement help

    I'm not sure I completely understand just what you want. Here's assuming
    that E9 is multiplied if one of the conditions is met. Also, if B9 contains
    any value greater than 0, the value in C9 will be ignored. Hopefully this
    will at least point you in the right direction. Post back with a clearer
    idea of what you want if you need more help.

    =IF(B9>0,E9*(B9/0.8),IF(C9>0,E9*(C9/0.9),E9))

    HTH,
    Elkar

    "ekfinch" wrote:

    >
    > I am trying to write a formula using multiple if statements or some
    > other method in Excel and I cannot seem to make it work. Here is the
    > scenario:
    >
    > If B9 > 0 then calculate value (E9) using (B9/.8) else
    > if C9 > 0 then calculate value (E9) using (C9/.9) else
    > E9.
    >
    > This is an insurance application dealing with coinsurance and
    > conversion to 100%.
    >
    > Any ideas would be greatly appreciated.
    >
    >
    > --
    > ekfinch
    > ------------------------------------------------------------------------
    > ekfinch's Profile: http://www.excelforum.com/member.php...o&userid=28658
    > View this thread: http://www.excelforum.com/showthread...hreadid=483260
    >
    >


  5. #5
    Registered User
    Join Date
    11-08-2005
    Posts
    3

    Nested If

    I am closer. Thanks for the help. I will clarify.

    If B>0 then I do not care about C. THere will never be anything there.
    SO, I just want E9 to be what is calculated in B9 or (B9/.8).

    If B9 is 0 and C9 > 0 then I want E9 to be what is calculated in C9 (C9/.9).

    If both B9 and C9 = 0 then there will be a value entered into E9. That is fine as it will not be used again without bringing in a new spreadsheet.

    Thanks,

    KF

  6. #6
    Elkar
    Guest

    Re: If statement help

    It sounds like swatsp0p's solution ought to work for you then.

    In E9 =IF(B9>0,B9/.8,IF(C9>0,C9/.9,"N/A"))

    You could adjust the "N/A" part to display "Enter value here" so that the
    user knows that a value needs to be manually entered.

    "ekfinch" wrote:

    >
    > I am closer. Thanks for the help. I will clarify.
    >
    > If B>0 then I do not care about C. THere will never be anything
    > there.
    > SO, I just want E9 to be what is calculated in B9 or (B9/.8).
    >
    > If B9 is 0 and C9 > 0 then I want E9 to be what is calculated in C9
    > (C9/.9).
    >
    > If both B9 and C9 = 0 then there will be a value entered into E9. That
    > is fine as it will not be used again without bringing in a new
    > spreadsheet.
    >
    > Thanks,
    >
    > KF
    >
    >
    > --
    > ekfinch
    > ------------------------------------------------------------------------
    > ekfinch's Profile: http://www.excelforum.com/member.php...o&userid=28658
    > View this thread: http://www.excelforum.com/showthread...hreadid=483260
    >
    >


  7. #7
    Registered User
    Join Date
    11-08-2005
    Posts
    3

    Nested if

    I took his and modified it. I do like the Enter Value Here.

    Thanks. This is really a helpful site.

    KF

  8. #8
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    I would caution the wording of "Enter Value Here", as this will be displayed in E9. You really want a value entered into either B9 or C9...not "Here" as that would overwrite your formula.

    You could use:

    E9=IF(B9>0,B9/0.8,IF(C9>0,C9/0.9,"Enter Value in B"&ROW()&" or C"&ROW()))

    which returns "Enter Value in B9 or C9" when both are blank. This formula allows the return to change as you copy the formula down your range (if needed).

    I am glad this is working for you.

    Cheers!

    Bruce

+ 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