Logic in Excel

Phoebe8178

New Member
Joined
Sep 22, 2002
Messages
17
I am attempting to set up a spreadsheet for life insurance policies. There are three age groups that will get a rate. I cannot figure out how to get a formula for this. I figured out the basic formula =IF(A2>=49,"$3.00","N/A". But I want to develop something that will allow me to put a range in where the 49 is. For example if the age groups are 18-49, 50-59, 60-64, I want to develop a formula that will allow me to just drop in the age and have the correct rate prop up. I really need help with this!!!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
On 2002-09-23 11:19, Phoebe8178 wrote:
I am attempting to set up a spreadsheet for life insurance policies. There are three age groups that will get a rate. I cannot figure out how to get a formula for this. I figured out the basic formula =IF(A2>=49,"$3.00","N/A". But I want to develop something that will allow me to put a range in where the 49 is. For example if the age groups are 18-49, 50-59, 60-64, I want to develop a formula that will allow me to just drop in the age and have the correct rate prop up. I really need help with this!!!

=IF(AND(A1>=18,A1<=64),INDEX({3.00,5.00,7.00},MATCH(A1,{18,50,60})),"")

where {3.00,5.00,7.00} consists of rates and {18,50,60} ages of interest. Adjust to suit. this formula returns an appropriate rate or a "" when appropriate.
This message was edited by Aladin Akyurek on 2002-09-23 16:46
 

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi Kris,

Welcome to the board. :)

Does this help?

=IF(OR(A2<18,A2>64),"Outside Range",IF(A2>49,IF(A2>59,"60-64","50-59"),"18-49"))

EDIT: Aladin is pretty hot on formulas - probably best to go with his option! :wink:
_________________<font color="blue"> «««<font color="red">¤<font color="blue"><font size=+1>Richie</font><font color="red">¤<font color="blue"> »»»</font>

caffeine_sample.gif
</gif>
This message was edited by Richie(UK) on 2002-09-23 11:44
 

Scott R

Active Member
Joined
Feb 20, 2002
Messages
444
Office Version
  1. 365
Platform
  1. Windows
=IF(AND(A1>=18,A5<=64),VLOOKUP(A1,{18,3;50,4;60,5},2),0)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,863
Messages
5,834,053
Members
430,260
Latest member
MANICX100

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top