Vlookup / index over multiple tables

AceFI

Board Regular
Joined
Apr 20, 2012
Messages
91
hey everyone!

Having trouble wraping my head around a formula..
i have 3 tables;

BestGreatGood
1 Year3 - 6 Years7 Years1 Year3 - 6 Years7 Years1 Year3 - 6 Years7 Years
QuoteCommissionQuoteCommissionAPRCommissionQuoteCommissionQuoteCommissionAPRCommissionQuoteCommissionQuoteCommissionAPRCommission
1.00%3.00%1.00%4.00%1.00%5.00%2.00%3.00%2.00%4.00%2.00%5.00%6.50%3.00%6.50%4.00%6.50%5.00%
1.25%2.70%1.25%3.60%1.25%4.45%2.85%2.70%2.85%3.60%2.85%4.45%7.50%2.70%7.50%3.60%7.50%4.45%
3.00%2.40%3.00%3.20%3.00%3.90%3.00%2.40%3.00%3.20%3.00%3.90%8.50%2.40%8.50%3.20%8.50%3.90%
3.70%2.10%3.70%2.75%3.70%3.35%3.24%2.10%3.24%2.75%3.24%3.35%8.65%2.10%8.65%2.75%8.65%3.35%
6.00%1.80%6.00%2.30%6.00%2.80%6.00%1.80%6.00%2.30%6.00%2.80%9.00%1.80%9.00%2.30%9.00%2.80%
6.74%1.50%6.74%1.85%6.74%2.25%6.74%1.50%6.74%1.85%6.74%2.25%10.00%1.50%10.00%1.85%10.00%2.25%

<colgroup><col><col><col><col><col><col><col><col span="6"><col><col span="6"></colgroup><tbody>
</tbody>


I would have 3 selection criteria with the ultimate goal to see the 'commission rate'

criteria 1 - Best or Great or Good
Criteria 2 - anything ranging from 1 to 7 'Years'
Criteria 3 - Quote % charged
Outcome - % commission

any idea on this one? thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
With your tables covering in A1:T9

and your criteria in A11 A12 A13

=INDEX(A4:T9,MATCH(A13,INDIRECT(LOOKUP(A11,{"Best","Good","Great"},{"A4:A9","O4:O9","H4:H9"}),1)),LOOKUP(A11,{"Best","Good","Great"},{1,15,8})+LOOKUP(A12,{1,3,7},{1,3,5}))

Adjust formula as necessary
 
Last edited:
Upvote 0
Pasting your tables into a blank spreadsheet at A1, all the tables are in the same format 6 columns + a blank column by 9 rows.

This part determines the column number to retrieve from the overall range A4:T9.

LOOKUP(A11,{"Best","Good","Great"},{1,15,8})+LOOKUP(A12,{1,3,7},{1,3,5})

The tables start at columns 1 15 and 8 so

LOOKUP(A11,{"Best","Good","Great"},{1,15,8}) returns the start column of each table, 1, 15 or 8 dependent on the name of the table in A11. However LOOKUP() needs the input "Best" "Great" "Goodt" in alphabetical order so I've had to reverse the order of both the input and return values so its Best Good Great and 1, 15, 8 rather than 1, 8, 15.
Having calculated the start column we need to add an offset to retrieve the commission column. So we use LOOKUP(A12,{1,3,7},{1,3,5}) to return a column offset of 1, 3 or 5 dependent on the number of years 1,3, 7, the value being in A12.

So if we have "Good" 4 years and 8.6%
MATCH would return values from O4:O9 ("Good"), the row being determined by the value in A13, ie 8.6%, nearest without going over is 8.5% so row number 3 in the %s (row number 6 in the overall 3 tables).
First LOOKUP returns 15 (Start column of 3rd table), second LOOKUP returns 3 (4 years). Added together is 18 (15 + 3) so we are looking at row 6, column 18 in the range A4:T9 which should return the cell at R9 retrieving 3.2%.

NOTE: The number of years is hard coded into the second LOOKUP so if you change the number of years in the tables you'll have to change it in the second LOOKUP.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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