+ Reply to Thread
Results 1 to 5 of 5

nested if statement- trying to avoid but don't know how

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    South Dakota
    MS-Off Ver
    Excel 2010
    Posts
    8

    nested if statement- trying to avoid but don't know how

    Okay,

    I have another formula issue. I am trying to write a formula to tell if the rate is "Above", "Exact", or "Below" a certain rate. The issue is there are three different variables to use to determine: Amount (has 6 different ranges), rating (could be 1-6), and the rate itself. Below is an attempt for a formula that ended up being a nested if statement which doesn't work. I have also attached the worksheet so you can see what I am working on. Any suggestions on writing this formula? I am not too excel savy, so you might need to explain a little. Thanks so much!

    =IF((A4=1)*AND(2501000>=C4)*AND(B4<(MAX('Rate Matrix'!E10:F10))),"Below",(IF((A4=1)*AND(2501000>=C4)*AND(B4=(MAX('Rate Matrix'!E10:'Rate Matrix'!F10))),"Exact",(IF((A4=1)*AND(2501000>=C4)*AND(B4>(MAX('Rate Matrix'!E10:F10))),"Above",(IF((A4=1)*AND(2501000>C4>=100100)*AND(B4<(MAX('Rate Matrix'!E9:F9))),"Below",(IF((A4=1)*AND(2501000>C4>=100100)*AND(B4=(MAX('Rate Matrix'!E9:F9))),"Exact",(IF((A4=1)*AND(2501000>C4>=100100)*AND(B4>(MAX('Rate Matrix'!E9:F9))),"Above",)))))))))))

    Test Pricing Sheet.xlsx

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: nested if statement- trying to avoid but don't know how

    Hi dumpster,

    Why you are not using col D i.e, amount category in your formula. Also would like to say that you are checking too many things in your formula and if not then needs to be checked. I believe logic should be simplified, else use col D to cut down the data search on another sheet.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    South Dakota
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: nested if statement- trying to avoid but don't know how

    I could use column D but I still need to check the other sheet for the rates to compare it against the greater of the two other rates. The rates I am comparing against will change regularly, so I need a formula to allow me to change them without issues. Thoughts?

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: nested if statement- trying to avoid but don't know how

    Hi dumpster,

    See the attached file where I have given suggestion plus query.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: nested if statement- trying to avoid but don't know how

    Hi there

    I think I've got this working. To make my version work using your data structure, I had to introduce column C on the Rate Matrix sheet. This is used to look up the amount of the loan.

    The function works using INDEX and MATCH.

    It works out which row it is looking at using the MATCH statement. It works out which column using the Risk Rating and multiplying by 3 (as there are 3 columns for each risk rating).

    Sample attached.

    Regards, Rob.
    Attached Files Attached Files

+ 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