Lookup with hierarchy (multiple criteria)

PrimeTimeAction

New Member
Joined
Aug 1, 2018
Messages
9
I have a database sheet contain info regarding some paratemetrs. I also have a selection criteria table to get a "result value" based on parameter values. I want to make a lookup formula in the database sheet that goes through a series of criteria and gets the "result value" accordingly.
I tried to make a function using index-match and countif, but it couldn't get anywhere. Can somebody offer any advice?

The Database looks like this:

Code:
[TABLE="width: 320"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Type[/TD]
[TD="class: xl65, width: 64"]Diameter[/TD]
[TD="class: xl65, width: 64"]Elevation[/TD]
[TD="class: xl65, width: 64"]Length[/TD]
[TD="class: xl65, width: 64"]Expected Result  from function[/TD]
[/TR]
[TR]
[TD="class: xl66"]Type A[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl67, align: right"]3[/TD]
[TD="class: xl67, align: right"]6[/TD]
[TD="class: xl67"]Result 6[/TD]
[/TR]
[TR]
[TD="class: xl66"]Type B[/TD]
[TD="class: xl67, align: right"]20[/TD]
[TD="class: xl67, align: right"]-5[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl68"]Result 7[/TD]
[/TR]
[TR]
[TD="class: xl66"]Type A[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl67, align: right"]1[/TD]
[TD="class: xl67, align: right"]1.5[/TD]
[TD="class: xl68"]Result 1[/TD]
[/TR]
</tbody>[/TABLE]


The criteria/grade assigning table looks like this

Code:
 [TABLE="width: 505"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Diameter[/TD]
[TD]Elevation Min[/TD]
[TD]Elevation Max[/TD]
[TD]Length min[/TD]
[TD]Length Max[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]10[/TD]
[TD]-6[/TD]
[TD]6[/TD]
[TD]1.2[/TD]
[TD]1.6[/TD]
[TD]Result 1[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]10[/TD]
[TD]-6[/TD]
[TD]6[/TD]
[TD]1.6[/TD]
[TD]3.2[/TD]
[TD]Result 2[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]10[/TD]
[TD]-18[/TD]
[TD]-7[/TD]
[TD]3.2[/TD]
[TD]3.2[/TD]
[TD]Result 3[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]20[/TD]
[TD]-6[/TD]
[TD]6[/TD]
[TD]1.2[/TD]
[TD]1.6[/TD]
[TD]Result 4[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]20[/TD]
[TD]-6[/TD]
[TD]6[/TD]
[TD]1.6[/TD]
[TD]3.2[/TD]
[TD]Result 5[/TD]
[/TR]
[TR]
[TD]Type A[/TD]
[TD]20[/TD]
[TD]-18[/TD]
[TD]-7[/TD]
[TD]3.2[/TD]
[TD]15[/TD]
[TD]Result 6[/TD]
[/TR]
[TR]
[TD]Type B[/TD]
[TD]20[/TD]
[TD]-7[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]13[/TD]
[TD]Result 7[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,214,895
Messages
6,122,128
Members
449,066
Latest member
Andyg666

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