INDEX+MATCH return a column from two drop down lists

mvoils

New Member
Joined
Jun 17, 2014
Messages
4
I am trying to create a database that will show me a list of motor specifications based on what we have them labeled as and were that unit is located. The data table looks something like this:

ABCDEFGHIJ
1Pump LocationPump NameHPVoltsPhaseRPMOverloadOCPD
2Well 1Well Pump224033000
3Well 2Well Pump524037500
4Plant 1Pump 11048031000
5Plant 1Pump 22548032500
6Plant 1Pump 32548032500
7Plant 2Pump 15024035000
8Plant 2Pump 25024035000
9Plant 2Pump 350480310000

<tbody>
</tbody>

The active table looks something like this:
ABCDEFGHI
1LocationNameHPVoltsPhaseRPM
2Drop Down MenuDrop Down Menu Dependent on A2ValueValueValueValue

<tbody>
</tbody>

The idea is you pick a location from the first drop down menu, then a name from the second drop down menu which is dependent on the first drop down menu, returning only the names that are at that location, and finally you are given a value dependent on both A2 and B2, found on the data table. Pumps are named the same at some locations, and some locations have more than one pumps so I cannot use just the one value, I must use both values.

Is there a way to have MATCH (or similar function) return an array instead of a column value? I could then have INDEX search an array defined by MATCH or the other way around?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi mvoils, try this array formula (Ctrl+Shift+Enter) as a starting point:

{=INDEX(C2:C9,MATCH(A13&B13,A2:A9&B2:B9,0),1)}

In my example, A13 and B13 are the two drop-down cells, and it's grabbing a value for horsepower. You'd change the C2:C9 reference to get other motor parameters.

As a side note, if it's not too late, I would strongly advise that you give all the equipment throughout your plant unique names. For instance, PM-W101 for the pump at well 1, and PM-W201 for the pump at well 2. This will make it much easier to do any sort of asset management activities in future!
 
Last edited:
Upvote 0
Thank you for the quick response!

Unfortunately the plant has been in operation for many many years before I came into the picture, and had many many updates and changes. That would be quite the undertaking to rename them all. :)

=INDEX(MotorData!C2:C150,MATCH(A2&E2,MotorData!A2:A150&MotorData!B2:B150,0),1)

This is the adjusted formula to individualize what you had given me. The Motor Data is on another sheet referenced by the MotorData! C2:C150 covers all of the third column (in this case it is actually Motor Brand Name) A2 and E2 are the two drop down menus, A2:A150 covers the locations, and B2:B150 cover the pump names in the massive data table, both referencing the MotorData sheet. I receive a #VALUE! Error.

Am I interpreting your formula correctly?
 
Upvote 0
I just noticed that I missed the array creation portion of the instructions. Which cells are a part of the array? The list that it is being derived from, or only the cell showing the listed information, or the listed cell and the drop down menus?
 
Last edited:
Upvote 0
Hi mvoils, if I'm interpreting your explanation of the layout of your data correctly, your formula should be correct. The "array creation portion" refers to confirming the formula with Ctrl+Shift+Enter, rather than just Enter. This makes Excel evaluate the formula cell-by-cell, so it will check your location and name against the first pair in the data table, then the second pair, etc.

If that still doesn't do the trick, can you upload your file somewhere like Dropbox, and share the link here?
 
Upvote 0
This has worked perfectly, and I thank you for your assistance and expediency :) Once I worked out the array it all fell into place - my mistake for skipping the first sentence!
 
Upvote 0

Forum statistics

Threads
1,216,128
Messages
6,129,033
Members
449,482
Latest member
al mugheen

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