Match Index, one down two along, different sized lookups!

nj2406

New Member
Joined
Jul 21, 2015
Messages
15
Hello! I will try to explain my sheets and formulas I have tried thus far.

I am trying to populate the top row of a table using a lookup sheet of various sites.
Here is the lookup, the reason for the repeated values in column B is another INDEX/MATCH within my table (which is populating just fine). I would like my column C values to appear in a table heading row, when the A column value is selected in a drop-down menu (shall we call this cell N2).

2b5me0.png


Here is my current formula, where I have added one to the + row value to move down my list.
=INDEX(Lookup!$A$1:$C$23,MATCH($N$2,Lookup!$A$1:$A$23,0)+1,3)

HOWEVER! As you may notice some of my mini-lists in column C are shorter than the other, and I would like my formula to stop populating my header row (at the moment it goes 0 for the space, then continues to the next list).

I have tried using the 0/space in the previous header row cell, in the hope that the rest of the heading row would be zeros, but it has only done this once, so two zeros before starting from the next mini-list.
i.e
=IF(A2=0,"0",INDEX(Lookup!$A$1:$C$23,MATCH($N$2,Lookup!$A$1:$A$23,0)+1,3))
2hz0kzp.png



Any help would be greatly appreciated, could this require an INDIRECT to assign the mini-list array?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
The lookup table is all values, however as my dropdown menu changes, I would like my header row in the new table to be populated by the mini-list in Column C, should Column A have been selected. Hope this makes sense!
 
Upvote 0
can you paste you values on here please so I can see what values you have

also am I right in saying that if your dropdown = A23 for example that your list will only have C23 value
if A22 then you list will have C22:C23 values

I need to picture this correctly
 
Upvote 0
The dropdown runs off of a different lookup of just the values/locations in Column A. The values are column C, these are what I'd like to populate a row on another page, when the appropriate location in A is selected.
Eg, in my other-page dropdown, "Aberdeen A UK" is selected, so I would like C1:C6 to populate the table row. When I select "Avonmouth B", I would like C15:C1 to populate it, however as you can see in the last picture, my current formula keeps populating down into the next location, so "Avonmouth A"'s related locations C20:C21 (and, in fact, the space in cell C19 which appears as a zero).

Many thanks
 
Upvote 0
Not sure which values you mean, all the values to populate my table row are in column C. Essentially these row values will change when the value in column A is selected. So my changing arrays will be C1:C6, C8:C13, C15:C18 and C20:C23 but these arrays are different sizes. These changes occur when my dropdown N2 changes, and equivalent Column A value, changing the array and thus table row values.
 
Upvote 0

Forum statistics

Threads
1,223,734
Messages
6,174,189
Members
452,550
Latest member
southernsquid2

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