+ Reply to Thread
Results 1 to 5 of 5

Nested IF Statements Will Not Calculate

  1. #1
    Registered User
    Join Date
    09-01-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Nested IF Statements Will Not Calculate

    Not even my husband who is, and I quote, “an award winning analyst” could figure this one out. Any help would be greatly appreciated!

    I am trying to calculate interest rates based on certain criteria. My formula is:
    =IF(V9="f",X9,IF(V9="P",IF('Current Rates'!$B$4+Y9<AA9,AA9,IF('Current Rates'!$B$4+Y9>Z9,Z9,'Current Rates'!$B$4+Y9)),IF(V9="L",IF('Current Rates'!$B$5+Y9<AA9,AA9,IF('Current Rates'!$B$5+Y9>Z9,Z9,'Current Rates'!$B$5+Y9)))))

    Where,
    V=Rate Type, inputted as text; “F” for fixed, “P” for prime and “L” for libor
    Y=Margin, inputted as a percentage
    Z=Ceiling, inputted as a percentage
    AA=Floor, inputted as a percentage
    AB=Interest Rate, calculated as a percentage
    X=Fixed Rate, inputted as a percentage
    ‘Current Rate’ $B$4 = Prime Rate, inputted as a percentage
    ‘Current Rate’ $B$5 = Libor Rate, inputted as a percentage

    In my data, 'Current Rates'!$B$5 = 0.3538%, V9 = L, Y19=1.4500% and all other columns are blank. The interest rate is calculating as 0.0000% instead of 1.8038%. If I put text in column Z19, the formula calculates properly. If I put text in column AA19, the formula calculates as text.

    I’m not tied to the nested if statements. Any formula that will calculate the rate based on type taking the floor, ceiling and margin into consideration will work.

    Thanks so much!
    Last edited by NBVC; 09-02-2010 at 11:42 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Nested IF Statements Will Not Calculate

    Try:

    Please Login or Register  to view this content.
    This ensures it only looks at Y9 and Z9 if there is a number in them....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-01-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Nested IF Statements Will Not Calculate

    Thanks for the response. Getting closer! The forulma still does not calculate the floor correctly. For example, if the floor is 9%, AB should calculate as 9.0000% instead of 1.8038%.

  4. #4
    Registered User
    Join Date
    09-01-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Nested IF Statements Will Not Calculate

    Nevermind, got it! I added an ISNUMBER for AA. Thank you so much for your help!

    =IF(V19="F",X19,IF(V19="P",IF('Current Rates'!$B$4+Y19<AA19,AA19,IF('Current Rates'!$B$4+Y19>Z19,Z19,'Current Rates'!$B$4+Y19)),IF(V19="L",IF(AND('Current Rates'!$B$5+Y19<AA19,ISNUMBER(AA19)),AA19,IF(AND('Current Rates'!$B$5+Y19>Z19,ISNUMBER(Z19)),Z19,'Current Rates'!$B$5+Y19)))))

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Nested IF Statements Will Not Calculate

    That was my fault.. I put the wrong reference in the Isnumber() function...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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