+ Reply to Thread
Results 1 to 5 of 5

Help translating If/Then fn to LOOKUP

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Birmingham, Alabama
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help translating If/Then fn to LOOKUP

    I am attempting to calculate premium rates for age banded life insurance. The problem is that there are 9 age bands, and the IF/THEN function caps out at 7 tests. Can anyone help me translate the formula below into a LOOKUP formula so that I can include all 9 tests?

    IF((P3<30, R3*.07, IF(AND(P3<35, >=30, R3*.09)), IF(AND(P3<40, >=35, R3*.11)), IF(AND(P3<45, >=40, R3*.15)), IF(AND(P3<50, >=45, R3*.24)), IF(AND(P3<55, >=50, R3*.36)), IF(AND(P3<60, >=55, R3*.62)), IF(AND(P3<65, >=60, R3*.87)), P3>=65, R3*1.51))

    Thank you!

  2. #2
    Forum Guru Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Help translating If/Then fn to LOOKUP

    Try

    =R3*LOOKUP(P3,{0,30,35,40,45,50,55,60,65},{0.07,0.09,0.11,0.15,0.24,0.36,0.62,0.87,1.51})
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 for Mac OSX & Windows
    Posts
    6,745

    Re: Help translating If/Then fn to LOOKUP

    if you create a table

    A B
    0 0.07
    30 0.09
    35 0.11
    40 0.15
    45 0.24
    50 0.36
    55 0.62
    60 0.87
    65 1.51

    I think that table would work

    then use

    =vlookup( P3, table range, 2, true) * R3

    worth testing I have the tiers correct

    vlookup when the last element is TRUE will find the lowest matching value in the table

    so if P3 between >=55 and <60 say 58
    then it would look through the table and see that the nearest lower value to 58 is 55 and so use 0.62

    now you can add as many tiers as you like
    Wayne

    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    Birmingham, Alabama
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help translating If/Then fn to LOOKUP

    Thank you so much for the help, Ace! That worked perfectly.

  5. #5
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,162

    Re: Help translating If/Then fn to LOOKUP

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Translating Xs to number values
    By Starmy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-22-2013, 07:16 PM
  2. Need help with translating Excel Functions
    By NoEffinWay in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2013, 12:13 AM
  3. Translating from text to value for a textbox
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2007, 02:59 AM
  4. Translating formulas
    By Cameron in forum Excel General
    Replies: 9
    Last Post: 08-03-2006, 06:50 AM
  5. translating formulas
    By Luc Benninger in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-04-2005, 01:06 PM

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