# Help translating If/Then fn to LOOKUP

1. ## 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!  Register To Reply

2. ## 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})  Register To Reply

3. ## 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  Register To Reply

4. ## Re: Help translating If/Then fn to LOOKUP

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

5. ## 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 -

Incase your issue is not solved, you can undo it as follows -

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.  Register To Reply

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