Multiple IF AND OR Statements

nmerchant

New Member
Joined
Mar 10, 2018
Messages
4
I'm trying to nest multiple IF statements, along with IF(AND(OR) statements within one cell. The "Premium Table" I have to use is below, along with a sample of the the worksheet. The question is: What IF statement do I enter in cell D2 to obtain the correct premium?

Premium Table


Age Range - Coverage Type - Premium Amount
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 239"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Ages 18-39[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Employee Only
Employee + Spouse
Employee + Child(ren)
Employee + Family[/TD]
[TD]$76.05
$366.19
$366.19
$366.19[/TD]
[/TR]
[TR]
[TD]Ages 40-49[/TD]
[TD]Employee Only
Employee + Spouse
Employee + Child(ren)
Employee + Family[/TD]
[TD]$111.20
$418.94
$418.94
$418.94[/TD]
[/TR]
[TR]
[TD]Ages 50-59[/TD]
[TD]Employee Only
Employee + Spouse
Employee + Child(ren)
Employee + Family[/TD]
[TD]$234.32
$586.02
$586.02
$586.02[/TD]
[/TR]
[TR]
[TD]Ages 60+[/TD]
[TD]Employee Only
Employee + Spouse
Employee + Child(ren)
Employee + Family[/TD]
[TD]$329.20
$821.56
$821.56
$821.56[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Employee Name[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]Coverage[/TD]
[TD="align: center"]Premium[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]John Doe[/TD]
[TD]35[/TD]
[TD]Employee + Family[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Jane Smith[/TD]
[TD]41[/TD]
[TD]Employee Only[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]Bob Johnson[/TD]
[TD]60[/TD]
[TD]Employee + Spouse[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the Forum.

I suggest you alter the layout and use functions INDEX and MATCH, which is much easier than nesting IF statements. Copy D11 down for each Employee enquiry.

ABCDE
John DoeEmployee + Family
Jane SmithEmployee Only
Bob JohnsonEmployee + Spouse

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #F8CBAD"]Premium Table[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="bgcolor: #FCE4D6"]Age Range[/TD]
[TD="bgcolor: #FCE4D6"]Employee Only[/TD]
[TD="bgcolor: #FCE4D6"]Employee + Spouse[/TD]
[TD="bgcolor: #FCE4D6"]Employee + Child(ren)[/TD]
[TD="bgcolor: #FCE4D6"]Employee + Family[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]$76.05[/TD]
[TD="align: right"]$366.19[/TD]
[TD="align: right"]$366.19[/TD]
[TD="align: right"]$366.19[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$111.20[/TD]
[TD="align: right"]$418.94[/TD]
[TD="align: right"]$418.94[/TD]
[TD="align: right"]$418.94[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]$234.32[/TD]
[TD="align: right"]$586.02[/TD]
[TD="align: right"]$586.02[/TD]
[TD="align: right"]$586.02[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]$329.20[/TD]
[TD="align: right"]$821.56[/TD]
[TD="align: right"]$821.56[/TD]
[TD="align: right"]$821.56[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]
[TD="bgcolor: #FFF2CC"]Employee Name[/TD]
[TD="bgcolor: #FFF2CC"]Age[/TD]
[TD="bgcolor: #FFF2CC"]Coverage[/TD]
[TD="bgcolor: #FFF2CC"]Premium[/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]35[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]$366.19[/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]41[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]$111.20[/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]

[TD="align: right"]60[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]$821.56[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet37

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D11[/TH]
[TD="align: left"]=INDEX($B$3:$E$6,MATCH(B11,$A$3:$A$6,1),MATCH(C11,$B$2:$E$2,0))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Try

Book1
ABCDEFGHI
1Employee NameAgeCoveragePremiumAge Range - Coverage Type - Premium Amount
2John Doe35Employee + Family366.19Ages 18-3918Employee Only$76.05
3Jane Smith41Employee Only111.218Employee + Spouse$366.19
4Bob Johnson60Employee + Spouse821.5618Employee + Child(ren)$366.19
518Employee + Family$366.19
6Ages 40-4940Employee Only$111.20
740Employee + Spouse$418.94
840Employee + Child(ren)$418.94
940Employee + Family$418.94
10Ages 50-5950Employee Only$234.32
1150Employee + Spouse$586.02
1250Employee + Child(ren)$586.02
1350Employee + Family$586.02
14Ages 60+60Employee Only$329.20
1560Employee + Spouse$821.56
1660Employee + Child(ren)$821.56
1760Employee + Family$821.56
Sheet1
Cell Formulas
RangeFormula
D2{=INDEX($I$2:$I$17,MATCH(VLOOKUP(B2,$G$2:$G$17,1)&C2,$G$2:$G$17&$H$2:$H$17,0))}
D3{=INDEX($I$2:$I$17,MATCH(VLOOKUP(B3,$G$2:$G$17,1)&C3,$G$2:$G$17&$H$2:$H$17,0))}
D4{=INDEX($I$2:$I$17,MATCH(VLOOKUP(B4,$G$2:$G$17,1)&C4,$G$2:$G$17&$H$2:$H$17,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you DRSTEELE and SCOTT T. Both options work great, and save a lot of time rather than nesting multiple IF statements.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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
Back
Top