Function Problems

Use Nested XLOOKUP to Return Age-Based Insurance Rates in Excel

Steven ParkerSteven Parker Dec 2, 2026 869 views

Question details

Find the insurance rate for an applicant by matching a qualified coverage amount and age band in a rate table.

Return Age-Based Insurance Rates with Nested XLOOKUP in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
An applicant's age and qualified coverage amount must be matched to the appropriate row and column of an insurance rate table.
Observed behavior
The desired result is the rate at the intersection of the matching coverage amount and age band.
Before you start

On Sheet1, place the applicant's age in A2 and the already-qualified coverage amount in C2. On Sheet2, put coverage amounts in A4:A8, age-band lower limits in B2:F2, upper limits in B3:F3, and corresponding rates in B4:F8; use unique coverage amounts and nonoverlapping age bands.

Solution 1Recommended

Use Nested XLOOKUP to Find the Matching Rate in Excel

Use this method in an Excel version that supports XLOOKUP to match the age band and coverage amount.

1
Check the rate table

On Sheet2, enter each age band's lower and upper limits in rows 2 and 3, with its rates directly below in rows 4 through 8. Enter the corresponding coverage amounts in A4:A8.

2
Enter the lookup formula

On Sheet1, select D2 and enter: =IFERROR(IF(A2>XLOOKUP(A2,Sheet2!$B$2:$F$2,Sheet2!$B$3:$F$3,,-1),"No matching age band",XLOOKUP(C2,Sheet2!$A$4:$A$8,XLOOKUP(A2,Sheet2!$B$2:$F$2,Sheet2!$B$4:$F$8,,-1),"Coverage not found")),"No matching age band")

3
Check the result

Compare D2 with the rate at the intersection of the matching coverage row and age-band column on Sheet2. Drag the fill handle from D2 down to apply the formula to other applicants.

Use Nested XLOOKUP to Find the Matching Rate in Excel
How the age match works: The inner XLOOKUP selects the greatest lower age limit that does not exceed A2. The IF test checks the selected band's upper limit, so an age in a gap or above the last band does not return a rate.
Calculate rates in WPS Spreadsheets

Find Age-Based Insurance Rates in WPS Spreadsheets

Open your rate workbook in WPS Spreadsheets and use INDEX and MATCH to select the rate for an applicant's age and qualified coverage amount.

  1. 1. Open the workbook: In WPS Spreadsheets, use Open to select your Excel workbook containing the applicant data and rate table.
  2. 2. Arrange the table: On Sheet2, place coverage amounts in A4:A8, age-band lower limits in B2:F2 in ascending order, upper limits in B3:F3, and rates in B4:F8.
  3. 3. Enter the formula: On Sheet1, select D2 and enter: =IFERROR(IF(A2>INDEX(Sheet2!$B$3:$F$3,1,MATCH(A2,Sheet2!$B$2:$F$2,1)),"No matching age band",INDEX(Sheet2!$B$4:$F$8,MATCH(C2,Sheet2!$A$4:$A$8,0),MATCH(A2,Sheet2!$B$2:$F$2,1))),"Age or coverage not found")
  4. 4. Check and save: Compare D2 with the appropriate rate on Sheet2, then use File > Save As to save the workbook in Excel format if needed.
Match age bands and coverage amounts to the corresponding rateOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and worksheets
microsoft office alternative - wps office

Frequently Asked Questions

What does C2 contain in these formulas?

C2 contains the qualified coverage amount to match exactly against Sheet2!A4:A8. The formulas do not calculate the qualified coverage amount from another value.

What happens if an age falls between two bands?

The formulas select the nearest lower age limit and then check its upper limit. If the age exceeds that upper limit, they return "No matching age band" instead of a rate.

Can I use XLOOKUP in Excel 2019 or Excel 2016?

XLOOKUP is not available in Excel 2019 or Excel 2016. Use the INDEX and MATCH solution instead, and sort the age-band lower limits in ascending order.

Why does the formula report that the coverage amount was not found?

Check that Sheet1!C2 exactly matches a value in Sheet2!A4:A8 and that both values are stored as numbers rather than one as text.

Does the returned rate include the insurance premium calculation?

No. The formula returns the rate from the table. Apply any separate premium calculation required by your insurance plan after retrieving the rate.