Returning data from a matrix table using multiple criteria

dsmith1088

New Member
Joined
Aug 31, 2017
Messages
11
Hi there

New to the forum, hoping you can help! I have numerous matrix tables showing miles per gallon (which varies with mileage and tonnage). Each vehicle registration number has its own table. I want to return values from those tables based on criteria. See below.



As you can see, the mileage and tonnage fall within the ranges within the table. I need to select the MPG falling underneath the higher range.


Note, there are too many tables to code the formula to each individual table, I need the table selection to be formulated/automated. Also, i can play about with the format/layout/position of tables if needed.

Thank you

David
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi there

Thanks for the update. See below. Is there any way to post a screenshot - would be much clearer for you to see

Vehicle regXYZ 5000User enterred
Mileage150User enterred
Tonnage2.4User enterred
MPG To be calculatedCalculated
XYZ 5000 Mileage
100200
Tonnage1105
294
383
XYZ 1000 Mileage
100300
Tonnage1115
275
364

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

David
 
Upvote 0
lorry 1tonnage
mpgmiles51015202530
table5015.515.214.914.614.314col Lcol S
7516.416.115.815.515.214.9
10017.31716.716.416.115.8
12518.217.917.617.31716.7
15019.118.818.518.217.917.6
1752019.719.419.118.818.5
20020.920.620.32019.719.4choose
22521.821.521.220.920.620.3lorrytonnagemileage
25022.722.422.121.821.521.2
27523.623.32322.722.422.1lorry 215225
30024.524.223.923.623.323
01234567
row 160lorry 2tonnage
1mpgmiles51015202530
2table5015.715.515.214.914.614.3
lorry 2tonnage3751615.815.515.214.914.6
mpgmiles51015202530410016.716.516.215.915.615.3
table5015.715.515.214.914.614.351251716.816.516.215.915.6
751615.815.515.214.914.6615017.717.517.216.916.616.3
10016.716.516.215.915.615.371751817.817.517.216.916.6
1251716.816.516.215.915.6820018.718.518.217.917.617.3
15017.717.517.216.916.616.392251918.818.518.217.917.6
1751817.817.517.216.916.61025019.719.519.218.918.618.3
20018.718.518.217.917.617.3112752019.819.519.218.918.6
2251918.818.518.217.917.61230020.720.520.219.919.619.3row 28
25019.719.519.218.918.618.3
2752019.819.519.218.918.6
30020.720.520.219.919.619.3first of all the correct table is pulled out and displayed
then the mpg figure for the specified parameters
MPG
18.5
formula for L16 (lorry 2)
=IF(OFFSET($A$1,MATCH($L$13,$A$2:$A$40,0)+$K16,L$15)=0,"",OFFSET($A$1,MATCH($L$13,$A$2:$A$40,0)+$K16,L$15))
dragged across and down
formula for MPG (18.5)
=OFFSET($M$17,MATCH($N$13,$M$18:$M$28,0),MATCH($M$13,$N$17:$S$17,0))

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col span="10"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi oldbrewer

Thank you very much for your reply. I think you might well have the answer for me but I'm finding it so hard to interpret because of the way the copy & pasting displays in the forum. Is there anyway you could should me an image/screenshot of your answer?

Thank you
 
Upvote 0
the original tables are in columns A to H - you could add another 100 lorries if you want - just change $a$40 to $a$2000

the offset works from A1 and searches column A for "lorry 2" [which is selected in cell L13]

the rest of the table is made by offsetting down and across

the formula for MPG is pretty self evident

what cannot you figure out - specifically
 
Upvote 0
Is there any way to post a screenshot - would be much clearer for you to see
There are tools you can use to post screen images. They are listed in Section B of this link here: Guidelines for Forum Use.
Also, there is a Test Here forum on this board that you can use to test out these tools to make sure they are working correctly before using them in your question.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,492
Members
448,967
Latest member
visheshkotha

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