Use Nested XLOOKUP to Return Age-Based Insurance Rates in Excel
Question details
Find the insurance rate for an applicant by matching a qualified coverage amount and age band in a rate table.

- 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.
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.
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.
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.
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")
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 INDEX and MATCH When XLOOKUP Is Unavailable
Use this alternative in Excel versions without XLOOKUP or in a compatible spreadsheet application.
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. Open the workbook: In WPS Spreadsheets, use Open to select your Excel workbook containing the applicant data and rate table.
- 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. 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. 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.

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.




